Update Dockerfile
Browse files- Dockerfile +8 -10
Dockerfile
CHANGED
@@ -1,21 +1,19 @@
|
|
1 |
-
# Use the official Python 3.10 image
|
2 |
FROM python:3.10
|
3 |
|
4 |
-
# Set
|
5 |
-
ARG HUGGINGFACE_HUB_TOKEN
|
6 |
-
ENV HUGGINGFACE_HUB_TOKEN=${HUGGINGFACE_HUB_TOKEN}
|
7 |
-
|
8 |
-
# Set the working directory inside the container
|
9 |
WORKDIR /app
|
10 |
|
11 |
-
# Copy
|
12 |
COPY . /app
|
13 |
|
14 |
-
# Install
|
15 |
RUN pip install --no-cache-dir -r requirements.txt
|
16 |
|
17 |
-
# Expose the port
|
18 |
EXPOSE 7860
|
19 |
|
20 |
-
#
|
|
|
|
|
|
|
21 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
1 |
FROM python:3.10
|
2 |
|
3 |
+
# Set working directory
|
|
|
|
|
|
|
|
|
4 |
WORKDIR /app
|
5 |
|
6 |
+
# Copy project files
|
7 |
COPY . /app
|
8 |
|
9 |
+
# Install dependencies
|
10 |
RUN pip install --no-cache-dir -r requirements.txt
|
11 |
|
12 |
+
# Expose the port that the app will run on
|
13 |
EXPOSE 7860
|
14 |
|
15 |
+
# Set environment variable for Hugging Face cache directory
|
16 |
+
ENV HF_HOME="/app/.cache"
|
17 |
+
|
18 |
+
# Command to run the FastAPI app with Uvicorn
|
19 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|