Spaces:
Running
Running
Update Dockerfile
Browse files- 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 |
-
#
|
8 |
-
|
9 |
-
|
10 |
-
#
|
11 |
-
|
12 |
-
|
13 |
-
#
|
14 |
-
|
15 |
-
|
16 |
-
#
|
|
|
|
|
|
|
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"]
|