SarahXia0405 commited on
Commit
65e99d0
·
verified ·
1 Parent(s): fcb37ad

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -3
Dockerfile CHANGED
@@ -11,10 +11,14 @@ RUN apt-get update && apt-get install -y \
11
  COPY requirements.txt ./
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
- COPY app.py ./
 
15
 
 
16
  COPY src/ ./src/
17
 
18
- EXPOSE 7860
 
 
19
 
20
- CMD ["bash", "-lc", "streamlit run app.py --server.address=0.0.0.0 --server.port=${PORT:-7860} --server.headless=true --server.enableCORS=false --server.enableXsrfProtection=false"]
 
11
  COPY requirements.txt ./
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # Copy entrypoint to repo root
15
+ COPY app.py ./app.py
16
 
17
+ # Copy any supporting modules
18
  COPY src/ ./src/
19
 
20
+ # HuggingFace Docker Spaces routes traffic to the port specified in README metadata (app_port).
21
+ # Keep this aligned with README app_port: 8501
22
+ EXPOSE 8501
23
 
24
+ CMD ["bash", "-lc", "streamlit run app.py --server.address=0.0.0.0 --server.port=${PORT:-8501} --server.headless=true --server.enableCORS=false --server.enableXsrfProtection=false"]