Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +4 -3
Dockerfile
CHANGED
|
@@ -1,5 +1,3 @@
|
|
| 1 |
-
# Dockerfile
|
| 2 |
-
|
| 3 |
# Start with a base image that has Python and NVIDIA's CUDA drivers
|
| 4 |
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
|
| 5 |
|
|
@@ -15,6 +13,9 @@ RUN apt-get update && apt-get install -y \
|
|
| 15 |
# Set the working directory inside the container
|
| 16 |
WORKDIR /app
|
| 17 |
|
|
|
|
|
|
|
|
|
|
| 18 |
# Copy and install Python dependencies
|
| 19 |
COPY requirements.txt .
|
| 20 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
|
@@ -26,4 +27,4 @@ COPY main.py .
|
|
| 26 |
EXPOSE 8000
|
| 27 |
|
| 28 |
# The command to start the Uvicorn server when the container runs
|
| 29 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
|
|
|
|
|
|
|
|
| 1 |
# Start with a base image that has Python and NVIDIA's CUDA drivers
|
| 2 |
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
|
| 3 |
|
|
|
|
| 13 |
# Set the working directory inside the container
|
| 14 |
WORKDIR /app
|
| 15 |
|
| 16 |
+
# Set a writable cache directory for Hugging Face models
|
| 17 |
+
ENV HF_HOME=/app/cache
|
| 18 |
+
|
| 19 |
# Copy and install Python dependencies
|
| 20 |
COPY requirements.txt .
|
| 21 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
|
|
|
| 27 |
EXPOSE 8000
|
| 28 |
|
| 29 |
# The command to start the Uvicorn server when the container runs
|
| 30 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|