triflix commited on
Commit
85e7180
·
verified ·
1 Parent(s): c0e4bdf

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -10
Dockerfile CHANGED
@@ -1,20 +1,19 @@
1
- # Use the slim version of Python 3.9 as the base image
2
- FROM python:3.9-slim
3
 
4
- # Set the working directory to /app
5
  WORKDIR /app
6
 
7
- # Copy requirements.txt first to leverage Docker cache efficiently
8
- COPY requirements.txt .
9
 
10
- # Install dependencies from requirements.txt
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Copy the rest of the application files into the container
14
- COPY . .
15
 
16
- # Expose a port (if necessary for your app)
17
  EXPOSE 7860
18
 
19
- # Run the app (make sure the file exists and is named correctly)
20
  CMD ["python", "app.py"]
 
1
+ FROM python:3.10-slim
 
2
 
3
+ # Set working directory
4
  WORKDIR /app
5
 
6
+ # Copy everything to /app
7
+ COPY . /app
8
 
9
+ # Install required packages
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
12
+ # Make sure /data exists
13
+ RUN mkdir -p /data
14
 
15
+ # Expose the port your Flask app runs on
16
  EXPOSE 7860
17
 
18
+ # Run the app
19
  CMD ["python", "app.py"]