Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +11 -8
Dockerfile
CHANGED
|
@@ -1,18 +1,21 @@
|
|
| 1 |
-
# Use a minimal
|
| 2 |
FROM python:3.9-slim
|
| 3 |
|
| 4 |
-
# Set
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Copy all files
|
| 8 |
COPY . .
|
| 9 |
|
| 10 |
-
#
|
| 11 |
-
RUN pip install --no-cache-dir
|
|
|
|
| 12 |
|
| 13 |
-
#
|
| 14 |
ENV STREAMLIT_SERVER_PORT=7860
|
| 15 |
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
|
|
|
|
|
|
| 16 |
|
| 17 |
-
#
|
| 18 |
-
CMD ["streamlit", "run", "app.py"
|
|
|
|
| 1 |
+
# Use a minimal image with Python 3.9
|
| 2 |
FROM python:3.9-slim
|
| 3 |
|
| 4 |
+
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy all project files
|
| 8 |
COPY . .
|
| 9 |
|
| 10 |
+
# Upgrade pip and install dependencies
|
| 11 |
+
RUN pip install --no-cache-dir --upgrade pip \
|
| 12 |
+
&& pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
| 14 |
+
# Streamlit-specific ENV vars for Hugging Face
|
| 15 |
ENV STREAMLIT_SERVER_PORT=7860
|
| 16 |
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
| 17 |
+
ENV STREAMLIT_SERVER_ENABLE_CORS=false
|
| 18 |
+
ENV STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION=false
|
| 19 |
|
| 20 |
+
# CMD to launch Streamlit
|
| 21 |
+
CMD ["streamlit", "run", "app.py"]
|