Davide Panza commited on
Commit
6850eb4
·
verified ·
1 Parent(s): 66e19fe

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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 7860 (Hugging Face Spaces standard)
28
- EXPOSE 7860
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 (update port)
36
- HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
37
 
38
- # Run Streamlit with port 7860
39
- ENTRYPOINT ["streamlit", "run", "main.py", "--server.port=7860", "--server.address=0.0.0.0"]
 
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"]