Update Dockerfile
Browse files- Dockerfile +33 -11
Dockerfile
CHANGED
|
@@ -1,32 +1,54 @@
|
|
| 1 |
# ββ Dockerfile βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
#
|
| 5 |
ENV PYTHONUNBUFFERED=1 \
|
| 6 |
STREAMLIT_DATA_DIR=/tmp/.streamlit \
|
| 7 |
XDG_STATE_HOME=/tmp \
|
| 8 |
STREAMLIT_BROWSER_GATHERUSAGESTATS=false
|
| 9 |
|
| 10 |
-
# OS
|
| 11 |
-
RUN apt-get update &&
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
# Pin numpy to avoid C-extension mismatches
|
| 15 |
RUN pip install --no-cache-dir numpy==1.23.5
|
| 16 |
|
| 17 |
-
# Install
|
| 18 |
RUN pip install --no-cache-dir \
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
# Download spaCy model
|
| 24 |
RUN python -m spacy download en_core_web_sm
|
| 25 |
|
| 26 |
-
# Set
|
| 27 |
WORKDIR /app
|
|
|
|
|
|
|
| 28 |
COPY . /app
|
|
|
|
|
|
|
| 29 |
EXPOSE 8501
|
| 30 |
|
| 31 |
-
#
|
| 32 |
-
ENTRYPOINT ["streamlit","run","app.py","--server.address=0.0.0.0","--server.port=8501
|
|
|
|
|
|
|
|
|
| 1 |
# ββ Dockerfile βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
+
# Environment variables for Streamlit telemetry and buffering
|
| 5 |
ENV PYTHONUNBUFFERED=1 \
|
| 6 |
STREAMLIT_DATA_DIR=/tmp/.streamlit \
|
| 7 |
XDG_STATE_HOME=/tmp \
|
| 8 |
STREAMLIT_BROWSER_GATHERUSAGESTATS=false
|
| 9 |
|
| 10 |
+
# Install OS dependencies
|
| 11 |
+
RUN apt-get update && \
|
| 12 |
+
apt-get install -y --no-install-recommends \
|
| 13 |
+
build-essential \
|
| 14 |
+
curl && \
|
| 15 |
+
rm -rf /var/lib/apt/lists/*
|
| 16 |
|
| 17 |
# Pin numpy to avoid C-extension mismatches
|
| 18 |
RUN pip install --no-cache-dir numpy==1.23.5
|
| 19 |
|
| 20 |
+
# Install Python dependencies
|
| 21 |
RUN pip install --no-cache-dir \
|
| 22 |
+
spacy==3.5.2 \
|
| 23 |
+
transformers \
|
| 24 |
+
huggingface-hub \
|
| 25 |
+
scikit-learn \
|
| 26 |
+
httpx \
|
| 27 |
+
pandas \
|
| 28 |
+
plotly \
|
| 29 |
+
fpdf \
|
| 30 |
+
streamlit \
|
| 31 |
+
streamlit-agraph \
|
| 32 |
+
networkx \
|
| 33 |
+
xmltodict \
|
| 34 |
+
feedparser \
|
| 35 |
+
pydantic \
|
| 36 |
+
openai \
|
| 37 |
+
google-generativeai
|
| 38 |
|
| 39 |
# Download spaCy model
|
| 40 |
RUN python -m spacy download en_core_web_sm
|
| 41 |
|
| 42 |
+
# Set working directory
|
| 43 |
WORKDIR /app
|
| 44 |
+
|
| 45 |
+
# Copy the app code
|
| 46 |
COPY . /app
|
| 47 |
+
|
| 48 |
+
# Expose Streamlit port
|
| 49 |
EXPOSE 8501
|
| 50 |
|
| 51 |
+
# Launch the Streamlit application
|
| 52 |
+
ENTRYPOINT ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=8501"], llm=llm))
|
| 53 |
+
st.subheader("Experimental Protocol")
|
| 54 |
+
st.write(doc)
|