Commit
·
70b7f99
1
Parent(s):
717c9c4
feat(space): install CUDA-enabled PyTorch (cu121) for GPU on Space
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
|
@@ -30,9 +30,9 @@ COPY . /app
|
|
| 30 |
# Install deps
|
| 31 |
RUN python -m pip install --upgrade pip && \
|
| 32 |
python -m pip install -r requirements.txt && \
|
| 33 |
-
#
|
| 34 |
-
python -m pip install --index-url https://download.pytorch.org/whl/
|
| 35 |
-
# Ensure xformers is not installed
|
| 36 |
python -m pip uninstall -y xformers || true && \
|
| 37 |
# Speed up and lower RAM during model load (avoid upgrading hub)
|
| 38 |
python -m pip install --no-deps accelerate && \
|
|
|
|
| 30 |
# Install deps
|
| 31 |
RUN python -m pip install --upgrade pip && \
|
| 32 |
python -m pip install -r requirements.txt && \
|
| 33 |
+
# Install CUDA-enabled PyTorch wheels (CUDA 12.1); required for GPU on Spaces
|
| 34 |
+
python -m pip install --index-url https://download.pytorch.org/whl/cu121 torch torchvision torchaudio --upgrade --force-reinstall && \
|
| 35 |
+
# Ensure xformers is not installed (optional perf lib; skip for compatibility)
|
| 36 |
python -m pip uninstall -y xformers || true && \
|
| 37 |
# Speed up and lower RAM during model load (avoid upgrading hub)
|
| 38 |
python -m pip install --no-deps accelerate && \
|