Kikulika commited on
Commit
39057fa
·
verified ·
1 Parent(s): 6171e86

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -7
Dockerfile CHANGED
@@ -1,15 +1,16 @@
1
  FROM python:3.9-slim
2
 
3
- # Create directory with proper permissions
4
- RUN mkdir -p /data && chmod 777 /data
5
-
6
- # Pre-create the tasks file with proper permissions
7
- RUN touch /data/tasks.csv && chmod 666 /data/tasks.csv
8
 
9
  WORKDIR /app
 
 
10
  COPY requirements.txt .
11
  RUN pip install --no-cache-dir -r requirements.txt
 
 
12
  COPY . .
13
 
14
- # Make sure permissions are set correctly when container starts
15
- CMD ["sh", "-c", "chmod 777 /data && chmod 666 /data/tasks.csv && streamlit run app.py --server.port=7860 --server.address=0.0.0.0"]
 
1
  FROM python:3.9-slim
2
 
3
+ # Create directories without changing permissions
4
+ RUN mkdir -p /app/data
 
 
 
5
 
6
  WORKDIR /app
7
+
8
+ # Copy requirements first (for better caching)
9
  COPY requirements.txt .
10
  RUN pip install --no-cache-dir -r requirements.txt
11
+
12
+ # Copy application code
13
  COPY . .
14
 
15
+ # Run the application
16
+ CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]