jaynopponep commited on
Commit
a1656e2
·
1 Parent(s): 66625c1

Fixing Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -7
Dockerfile CHANGED
@@ -1,3 +1,4 @@
 
1
  FROM python:3.9
2
 
3
  # Set the working directory in the container
@@ -6,16 +7,15 @@ WORKDIR /code
6
  # Copy the dependencies file to the working directory
7
  COPY ./requirements.txt /code/requirements.txt
8
 
9
- # Install dependencies
10
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
11
 
12
- # Copy the content of the local src directory to the working directory
13
- COPY . .
14
 
15
- # Create a directory for the Hugging Face cache and ensure correct permissions
16
- RUN mkdir -p /code/huggingface_cache
17
- RUN chmod -R 777 /code/huggingface_cache
18
  ENV HF_HOME=/code/huggingface_cache
19
 
20
- # Set the command to run on container start
21
  CMD ["sh", "-c", "gunicorn -b 0.0.0.0:7860 app:app"]
 
1
+ # Use an official Python runtime as a parent image
2
  FROM python:3.9
3
 
4
  # Set the working directory in the container
 
7
  # Copy the dependencies file to the working directory
8
  COPY ./requirements.txt /code/requirements.txt
9
 
10
+ # Install any needed packages specified in requirements.txt
11
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
 
13
+ # Copy the rest of your application's code to the working directory
14
+ COPY . /code
15
 
16
+ # Create a directory for the Hugging Face cache and set correct permissions
17
+ RUN mkdir -p /code/huggingface_cache && chmod -R 777 /code/huggingface_cache
 
18
  ENV HF_HOME=/code/huggingface_cache
19
 
20
+ # Run the application
21
  CMD ["sh", "-c", "gunicorn -b 0.0.0.0:7860 app:app"]