tsrivallabh commited on
Commit
a2b767a
·
verified ·
1 Parent(s): ec346f3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -8
Dockerfile CHANGED
@@ -1,20 +1,22 @@
1
- # Use an official Python runtime as a parent image
2
  FROM python:3.11-slim
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
- # Copy everything first (including .streamlit)
 
 
 
 
 
 
 
8
  COPY . .
9
 
10
- # Fix permissions (make sure /app is writable)
11
  RUN chmod -R 777 /app
12
 
13
- # Install dependencies
14
- RUN pip install --no-cache-dir -r requirements.txt
15
-
16
- # Expose port
17
  EXPOSE 8501
18
 
19
- # Run Streamlit
20
  CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
1
+ # Use an official Python runtime
2
  FROM python:3.11-slim
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Set home so Streamlit writes ~/.streamlit inside /app
8
+ ENV HOME=/app
9
+
10
+ # Copy requirements and install
11
+ COPY requirements.txt .
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # Copy the rest, including .streamlit folder
15
  COPY . .
16
 
17
+ # Ensure /app is writable
18
  RUN chmod -R 777 /app
19
 
 
 
 
 
20
  EXPOSE 8501
21
 
 
22
  CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]