Davide Panza commited on
Commit
66e19fe
·
verified ·
1 Parent(s): 227c59c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -7
Dockerfile CHANGED
@@ -24,14 +24,16 @@ COPY requirements.txt ./
24
  # Install Python dependencies
25
  RUN pip3 install -r requirements.txt
26
 
27
- # Expose the default Streamlit port
28
- EXPOSE 8501
29
 
30
- # Set environment variable so Streamlit uses the writable config directory
31
  ENV STREAMLIT_CONFIG_DIR=/app/.streamlit
 
 
32
 
33
- # Healthcheck endpoint for Spaces
34
- HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
35
 
36
- # Run Streamlit from the main entry point
37
- ENTRYPOINT ["streamlit", "run", "main.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
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"]