Terence9 commited on
Commit
8b3695f
·
verified ·
1 Parent(s): 0cb76d7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -3
Dockerfile CHANGED
@@ -8,11 +8,14 @@ RUN pip install --no-cache-dir -r requirements.txt
8
  # Copy all code, including templates and static folders
9
  COPY . .
10
 
11
- # Create uploads directory with write permissions
12
- RUN mkdir -p /code/uploads && chmod 777 /code/uploads
 
 
 
13
 
14
  EXPOSE 7860
15
 
16
  ENV FLASK_APP=app.py
17
 
18
- CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]
 
8
  # Copy all code, including templates and static folders
9
  COPY . .
10
 
11
+ # Create uploads directory and set permissions for both uploads and prediction history
12
+ RUN mkdir -p /code/uploads && \
13
+ touch /code/prediction_history.json && \
14
+ chmod 777 /code/uploads && \
15
+ chmod 777 /code/prediction_history.json
16
 
17
  EXPOSE 7860
18
 
19
  ENV FLASK_APP=app.py
20
 
21
+ CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]