vancyferns commited on
Commit
7610381
·
1 Parent(s): 82dc908

updated docker file

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -9
Dockerfile CHANGED
@@ -2,23 +2,23 @@
2
  FROM python:3.10-slim
3
 
4
  # Set the working directory inside the container
5
- WORKDIR /model
 
6
 
7
- # Copy the requirements file first to leverage Docker's build cache
8
- COPY requirements.txt .
9
 
10
  # Install the Python dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Copy the rest of the application code into the container
14
- # This includes app.py, the dnn folder, and other directories
15
- COPY . .
16
 
17
  # Expose the port where the Flask API will run
18
- # This should match the app_port defined in your README.md
19
  EXPOSE 7860
20
 
21
  # Define the command to run the application using Gunicorn
22
- # 'app:app' means the Flask instance named 'app' is in the 'app.py' file.
23
- # The --bind 0.0.0.0:7860 makes Gunicorn listen on all available network interfaces on port 7860.
24
  CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
 
2
  FROM python:3.10-slim
3
 
4
  # Set the working directory inside the container
5
+ # This is where your application code will reside
6
+ WORKDIR /app
7
 
8
+ # Copy the requirements file from the 'model' directory to the container's working directory
9
+ COPY model/requirements.txt .
10
 
11
  # Install the Python dependencies
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # Copy the rest of the 'model' directory's contents into the container
15
+ # This includes app.py, the dnn folder, and all other files within 'model'
16
+ COPY model .
17
 
18
  # Expose the port where the Flask API will run
 
19
  EXPOSE 7860
20
 
21
  # Define the command to run the application using Gunicorn
22
+ # 'app:app' means the Flask instance named 'app' is in the 'app.py' file,
23
+ # which is now in the /app directory.
24
  CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]