Update Dockerfile
Browse files- Dockerfile +33 -27
Dockerfile
CHANGED
@@ -1,42 +1,44 @@
|
|
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 |
-
# Install
|
11 |
RUN apt-get update && \
|
12 |
apt-get install -y --no-install-recommends \
|
13 |
-
|
14 |
-
|
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 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
#
|
40 |
RUN python -m spacy download en_core_web_sm
|
41 |
|
42 |
# Set working directory
|
@@ -45,8 +47,12 @@ WORKDIR /app
|
|
45 |
# Copy application code
|
46 |
COPY . /app
|
47 |
|
48 |
-
# Expose Streamlit port
|
49 |
EXPOSE 8501
|
50 |
|
51 |
-
# Launch Streamlit app
|
52 |
-
|
|
|
|
|
|
|
|
|
|
1 |
+
# ββ Dockerfile for MedGenesis AI ββββββββββββββββββββββββββββββββββββββββ
|
2 |
+
|
3 |
+
# Use a lightweight Python base image
|
4 |
FROM python:3.10-slim
|
5 |
|
6 |
+
# Ensure stdout/stderr are not buffered, and configure Streamlit telemetry
|
7 |
ENV PYTHONUNBUFFERED=1 \
|
8 |
STREAMLIT_DATA_DIR=/tmp/.streamlit \
|
9 |
XDG_STATE_HOME=/tmp \
|
10 |
STREAMLIT_BROWSER_GATHERUSAGESTATS=false
|
11 |
|
12 |
+
# Install system dependencies
|
13 |
RUN apt-get update && \
|
14 |
apt-get install -y --no-install-recommends \
|
15 |
+
build-essential \
|
16 |
+
curl && \
|
17 |
rm -rf /var/lib/apt/lists/*
|
18 |
|
19 |
+
# Pin numpy to avoid C-extension mismatches with spaCy
|
20 |
RUN pip install --no-cache-dir numpy==1.23.5
|
21 |
|
22 |
# Install Python dependencies
|
23 |
RUN pip install --no-cache-dir \
|
24 |
+
spacy==3.5.2 \
|
25 |
+
transformers \
|
26 |
+
huggingface-hub \
|
27 |
+
scikit-learn \
|
28 |
+
httpx \
|
29 |
+
pandas \
|
30 |
+
plotly \
|
31 |
+
fpdf \
|
32 |
+
streamlit \
|
33 |
+
streamlit-agraph \
|
34 |
+
networkx \
|
35 |
+
xmltodict \
|
36 |
+
feedparser \
|
37 |
+
pydantic \
|
38 |
+
openai \
|
39 |
+
google-generativeai
|
40 |
+
|
41 |
+
# Pre-download spaCy English model
|
42 |
RUN python -m spacy download en_core_web_sm
|
43 |
|
44 |
# Set working directory
|
|
|
47 |
# Copy application code
|
48 |
COPY . /app
|
49 |
|
50 |
+
# Expose Streamlit default port
|
51 |
EXPOSE 8501
|
52 |
|
53 |
+
# Launch the Streamlit app in headless mode with debug logging
|
54 |
+
CMD ["streamlit", "run", "app.py", \
|
55 |
+
"--server.address=0.0.0.0", \
|
56 |
+
"--server.port=8501", \
|
57 |
+
"--server.headless", "true", \
|
58 |
+
"--logger.level", "info"]
|