Update Dockerfile
Browse files- Dockerfile +19 -25
Dockerfile
CHANGED
|
@@ -1,38 +1,32 @@
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
-
Set environment
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 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
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
|
|
|
|
| 21 |
RUN python -m spacy download en_core_web_sm
|
| 22 |
|
| 23 |
-
Set
|
| 24 |
-
|
| 25 |
WORKDIR /app
|
| 26 |
-
|
| 27 |
-
Copy application code
|
| 28 |
-
|
| 29 |
COPY . /app
|
| 30 |
-
|
| 31 |
-
Expose Streamlit port
|
| 32 |
-
|
| 33 |
EXPOSE 8501
|
| 34 |
|
| 35 |
-
|
| 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"]
|
|
|
|
|
|