Spaces:
Running on Zero
Running on Zero
Minjun Kang commited on
Commit ·
8284daa
1
Parent(s): da6eaac
dockerfile edit
Browse files- Dockerfile +11 -3
Dockerfile
CHANGED
|
@@ -10,10 +10,18 @@ ENV HOME=/home/user \
|
|
| 10 |
|
| 11 |
WORKDIR /home/user/app
|
| 12 |
|
| 13 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
RUN pip install --no-cache-dir --user \
|
| 15 |
-
torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0
|
| 16 |
-
--index-url https://download.pytorch.org/whl/cpu
|
| 17 |
|
| 18 |
# Install remaining dependencies
|
| 19 |
COPY --chown=user requirements.txt .
|
|
|
|
| 10 |
|
| 11 |
WORKDIR /home/user/app
|
| 12 |
|
| 13 |
+
# NOTE: this Dockerfile is NOT used by the deployed Space — README.md sets
|
| 14 |
+
# `sdk: gradio`, so HF Spaces builds from requirements.txt on the managed
|
| 15 |
+
# Gradio image and ignores this file entirely. It is kept only for local
|
| 16 |
+
# Docker testing. ZeroGPU (spaces.GPU) is only supported on Gradio-SDK
|
| 17 |
+
# Spaces, not Docker-SDK Spaces, so this file must never become the actual
|
| 18 |
+
# build path if ZeroGPU is required.
|
| 19 |
+
|
| 20 |
+
# Install PyTorch with CUDA support (default PyPI index) so torch.cuda is
|
| 21 |
+
# available — ZeroGPU attaches a real GPU to the process at call time, so a
|
| 22 |
+
# CPU-only wheel would make torch.cuda.is_available() return False.
|
| 23 |
RUN pip install --no-cache-dir --user \
|
| 24 |
+
torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0
|
|
|
|
| 25 |
|
| 26 |
# Install remaining dependencies
|
| 27 |
COPY --chown=user requirements.txt .
|