Spaces:
Runtime error
Runtime error
msg
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
|
@@ -3,10 +3,11 @@ FROM python:3.9
|
|
| 3 |
# Set the working directory
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
-
#
|
| 7 |
-
|
| 8 |
|
| 9 |
-
#
|
|
|
|
| 10 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
|
| 12 |
# Copy the FastAPI application code
|
|
@@ -16,4 +17,4 @@ COPY . .
|
|
| 16 |
EXPOSE 8000
|
| 17 |
|
| 18 |
# Command to run the application
|
| 19 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
|
|
| 3 |
# Set the working directory
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Set an environment variable to redirect Hugging Face cache
|
| 7 |
+
ENV HF_HOME=/app/huggingface_cache
|
| 8 |
|
| 9 |
+
# Copy requirements and install dependencies
|
| 10 |
+
COPY requirements.txt .
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
# Copy the FastAPI application code
|
|
|
|
| 17 |
EXPOSE 8000
|
| 18 |
|
| 19 |
# Command to run the application
|
| 20 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|