DeepActionPotential commited on
Commit
97b1b9b
·
verified ·
1 Parent(s): 1b378f9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -4
Dockerfile CHANGED
@@ -1,17 +1,21 @@
1
-
2
  FROM python:3.12-slim
3
 
 
4
  WORKDIR /app
5
 
6
- Copy the requirements file into the container
7
  COPY requirements.txt .
8
 
 
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
 
11
  RUN pip install gunicorn
12
 
13
- Copy all application code (including app.py and any static files) into the container
 
14
  COPY . .
15
 
16
-
 
17
  CMD exec gunicorn --bind :7860 --workers 1 --threads 8 app:app
 
 
1
  FROM python:3.12-slim
2
 
3
+ # Set the working directory in the container
4
  WORKDIR /app
5
 
6
+ # Copy the requirements file into the container
7
  COPY requirements.txt .
8
 
9
+ # Install all Python dependencies
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
12
+ # Install gunicorn to run the Flask app
13
  RUN pip install gunicorn
14
 
15
+ # Copy all application code into the current directory (/app)
16
+ # This is the line that must be simple: COPY <source> <destination>
17
  COPY . .
18
 
19
+ # Define the default command to run the application using gunicorn.
20
+ # The 'app:app' assumes your Flask app instance is named 'app' inside 'app.py'.
21
  CMD exec gunicorn --bind :7860 --workers 1 --threads 8 app:app