mgbam commited on
Commit
e9291d3
Β·
verified Β·
1 Parent(s): f75e371

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -25
Dockerfile CHANGED
@@ -1,38 +1,32 @@
 
1
  FROM python:3.10-slim
2
 
3
- Set environment variables
 
 
 
 
4
 
5
- ENV PYTHONUNBUFFERED=1 STREAMLIT_DATA_DIR=/tmp/.streamlit XDG_STATE_HOME=/tmp STREAMLIT_BROWSER_GATHERUSAGESTATS=false
6
-
7
- Install OS-level dependencies
8
-
9
- RUN apt-get update && apt-get install -y --no-install-recommends build-essential curl && rm -rf /var/lib/apt/lists/*
10
-
11
- Pin numpy to avoid binary incompatibility issues
12
 
 
13
  RUN pip install --no-cache-dir numpy==1.23.5
14
 
15
- Install Python dependencies
16
-
17
- RUN pip install --no-cache-dir spacy==3.5.2 httpx pandas plotly fpdf streamlit streamlit-agraph networkx xmltodict feedparser pydantic openai google-generative-ai
18
-
19
- Download the spaCy small English model
20
 
 
21
  RUN python -m spacy download en_core_web_sm
22
 
23
- Set working directory
24
-
25
  WORKDIR /app
26
-
27
- Copy application code
28
-
29
  COPY . /app
30
-
31
- Expose Streamlit port
32
-
33
  EXPOSE 8501
34
 
35
- Default command
36
-
37
- ENTRYPOINT ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=8501"]
38
-
 
1
+ # ── Dockerfile ─────────────────────────────────────────────────────────
2
  FROM python:3.10-slim
3
 
4
+ # Set environment
5
+ ENV PYTHONUNBUFFERED=1 \
6
+ STREAMLIT_DATA_DIR=/tmp/.streamlit \
7
+ XDG_STATE_HOME=/tmp \
8
+ STREAMLIT_BROWSER_GATHERUSAGESTATS=false
9
 
10
+ # OS deps
11
+ RUN apt-get update && apt-get install -y --no-install-recommends \
12
+ build-essential curl && rm -rf /var/lib/apt/lists/*
 
 
 
 
13
 
14
+ # Pin numpy to avoid C-extension mismatches
15
  RUN pip install --no-cache-dir numpy==1.23.5
16
 
17
+ # Install core Python libs + ML/embeddings
18
+ RUN pip install --no-cache-dir \
19
+ spacy==3.5.2 transformers huggingface-hub scikit-learn httpx pandas plotly \
20
+ fpdf streamlit streamlit-agraph networkx xmltodict feedparser pydantic openai \
21
+ google-generative-ai
22
 
23
+ # Download spaCy model
24
  RUN python -m spacy download en_core_web_sm
25
 
26
+ # Set workdir
 
27
  WORKDIR /app
 
 
 
28
  COPY . /app
 
 
 
29
  EXPOSE 8501
30
 
31
+ # Entrypoint
32
+ ENTRYPOINT ["streamlit","run","app.py","--server.address=0.0.0.0","--server.port=8501"]