Spaces:
Sleeping
Sleeping
Davide Panza
commited on
Update Dockerfile
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
|
@@ -24,16 +24,16 @@ COPY requirements.txt ./
|
|
| 24 |
# Install Python dependencies
|
| 25 |
RUN pip3 install -r requirements.txt
|
| 26 |
|
| 27 |
-
# Expose port
|
| 28 |
-
EXPOSE
|
| 29 |
|
| 30 |
# Set environment variables for Streamlit
|
| 31 |
ENV STREAMLIT_CONFIG_DIR=/app/.streamlit
|
| 32 |
ENV STREAMLIT_SERVER_HEADLESS=true
|
| 33 |
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
|
| 34 |
|
| 35 |
-
# Healthcheck endpoint for Spaces
|
| 36 |
-
HEALTHCHECK CMD curl --fail http://localhost:
|
| 37 |
|
| 38 |
-
# Run Streamlit with port
|
| 39 |
-
ENTRYPOINT ["streamlit", "run", "main.py", "--server.
|
|
|
|
| 24 |
# Install Python dependencies
|
| 25 |
RUN pip3 install -r requirements.txt
|
| 26 |
|
| 27 |
+
# Expose port 8501 (Streamlit Spaces requirement)
|
| 28 |
+
EXPOSE 8501
|
| 29 |
|
| 30 |
# Set environment variables for Streamlit
|
| 31 |
ENV STREAMLIT_CONFIG_DIR=/app/.streamlit
|
| 32 |
ENV STREAMLIT_SERVER_HEADLESS=true
|
| 33 |
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
|
| 34 |
|
| 35 |
+
# Healthcheck endpoint for Spaces
|
| 36 |
+
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 37 |
|
| 38 |
+
# Run Streamlit with port 8501 (DO NOT override port)
|
| 39 |
+
ENTRYPOINT ["streamlit", "run", "main.py", "--server.address=0.0.0.0"]
|