Ayan515 commited on
Commit
0e6b776
·
verified ·
1 Parent(s): 755cc8a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -16
Dockerfile CHANGED
@@ -1,17 +1,20 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.9-slim
3
-
4
- # Set the working directory in the container
5
- WORKDIR /app
6
-
7
- # Copy the requirements file into the container
8
- COPY requirements.txt .
9
-
10
- # Install any needed packages specified in requirements.txt
11
- RUN pip install --no-cache-dir -r requirements.txt
12
-
13
- # Copy the rest of the application's code to the working directory
14
- COPY . .
15
-
16
- # Command to run the application
 
 
 
17
  CMD ["uvicorn", "deepfake_api:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.9-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Set the cache directory for Hugging Face models
8
+ ENV HF_HOME /app/cache
9
+
10
+ # Copy the requirements file into the container
11
+ COPY requirements.txt .
12
+
13
+ # Install any needed packages specified in requirements.txt
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Copy the rest of the application's code to the working directory
17
+ COPY . .
18
+
19
+ # Command to run the application
20
  CMD ["uvicorn", "deepfake_api:app", "--host", "0.0.0.0", "--port", "7860"]