ABUBAKAR2001 commited on
Commit
a5779bc
·
verified ·
1 Parent(s): 6a9883b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -17
Dockerfile CHANGED
@@ -1,22 +1,18 @@
1
- # Use official Python image
2
- FROM python:3.9-slim
3
-
4
- # Set a writable directory
5
- ENV HOME=/app
6
- WORKDIR $HOME
7
-
8
- # Copy code
9
- COPY . .
10
 
11
  # Install dependencies
12
- RUN pip install --upgrade pip && \
13
- pip install -r requirements.txt
14
 
15
- # Optional: Disable usage stats
16
- RUN streamlit config set browser.gatherUsageStats false
 
 
 
 
17
 
18
- # Expose the Streamlit port
19
- EXPOSE 8501
 
20
 
21
- # Run the Streamlit app
22
- CMD ["streamlit", "run", "your_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
1
+ FROM python:3.10-slim
 
 
 
 
 
 
 
 
2
 
3
  # Install dependencies
4
+ RUN pip install streamlit
 
5
 
6
+ # Set Streamlit config to not gather usage stats
7
+ RUN mkdir -p /root/.streamlit && \
8
+ echo "\
9
+ [browser]\n\
10
+ gatherUsageStats = false\n\
11
+ " > /root/.streamlit/config.toml
12
 
13
+ # Copy your app files
14
+ COPY . /app
15
+ WORKDIR /app
16
 
17
+ # Run the app
18
+ CMD ["streamlit", "run", "app.py"]