Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +6 -2
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
#
|
| 2 |
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
|
| 3 |
|
| 4 |
# Set up the environment
|
|
@@ -19,7 +19,11 @@ ENV HF_HOME=/app/cache
|
|
| 19 |
# Create the cache directory and give it open permissions
|
| 20 |
RUN mkdir -p /app/cache && chmod 777 /app/cache
|
| 21 |
|
| 22 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
COPY requirements.txt .
|
| 24 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 25 |
|
|
|
|
| 1 |
+
# Use the CUDA 11.8 base image
|
| 2 |
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
|
| 3 |
|
| 4 |
# Set up the environment
|
|
|
|
| 19 |
# Create the cache directory and give it open permissions
|
| 20 |
RUN mkdir -p /app/cache && chmod 777 /app/cache
|
| 21 |
|
| 22 |
+
# ⭐⭐⭐ ADD THIS BLOCK ⭐⭐⭐
|
| 23 |
+
# Install PyTorch and related libraries for CUDA 11.8 separately
|
| 24 |
+
RUN pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
|
| 25 |
+
|
| 26 |
+
# Copy and install the rest of the Python dependencies
|
| 27 |
COPY requirements.txt .
|
| 28 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 29 |
|