Jing997 commited on
Commit
cf7c703
·
verified ·
1 Parent(s): a26580f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -9,8 +9,9 @@ RUN pip install --no-cache-dir -r requirements.txt
9
  # Copy the application code
10
  COPY . .
11
 
12
- # Expose the Streamlit port
13
- EXPOSE 8501
 
14
 
15
- # Command to run the application
16
- CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=8501"]
 
9
  # Copy the application code
10
  COPY . .
11
 
12
+ # Set default port and expose it (Spaces default is 7860)
13
+ ENV PORT=7860
14
+ EXPOSE 7860
15
 
16
+ # Command to run the application on the assigned port
17
+ CMD ["bash", "-c", "streamlit run app.py --server.address=0.0.0.0 --server.port=${PORT}"]