ebinan92 commited on
Commit
6a66612
·
verified ·
1 Parent(s): 0935446

Fix ZeroGPU compat: torch 2.6.0 -> 2.8.0, update causal_conv1d wheel

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -8
Dockerfile CHANGED
@@ -3,8 +3,9 @@
3
  # Mirrors the HF Space (ZeroGPU) stack so we can validate the inference path
4
  # locally without the host's CUDA-13/Python-3.12 incompatibilities:
5
  # - Ubuntu 22.04 ships Python 3.10 (= Space's Python)
6
- # - cu12.4 runtime libs (pre-built torch 2.6.0 cu12 wheels target this)
7
- # - causal_conv1d wheel for cu12torch2.6 / cp310 / cxx11abi=FALSE
 
8
  #
9
  # Build:
10
  # docker build -t qwen3.5-ocr-jp-2b-local spaces/Qwen3.5-ocr-jp-2b/
@@ -15,7 +16,7 @@
15
  # qwen3.5-ocr-jp-2b-local
16
  # Open http://localhost:7860
17
 
18
- FROM nvidia/cuda:12.4.1-devel-ubuntu22.04
19
 
20
  # `devel` (not `runtime`) is required: triton JIT-compiles its CUDA driver
21
  # bindings (`backends/nvidia/driver.c` → `cuda_utils.so`) at first invocation,
@@ -39,18 +40,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
39
 
40
  WORKDIR /app
41
 
42
- # Pin torch+vision from the cu12.4 index so the wheel ABI matches our cuda image.
43
  RUN pip install --no-cache-dir \
44
- --extra-index-url https://download.pytorch.org/whl/cu124 \
45
- torch==2.6.0 torchvision==0.21.0
46
 
47
  COPY requirements.txt .
48
  RUN pip install --no-cache-dir -r requirements.txt
49
 
50
- # Pre-install causal_conv1d for fla fast path (Python 3.10 / cu12 / torch 2.6 / cxx11abi=FALSE).
51
  # app.py also tries to install at runtime; this pre-install just makes startup faster.
52
  RUN pip install --no-cache-dir --no-deps \
53
- https://github.com/Dao-AILab/causal-conv1d/releases/download/v1.5.0.post8/causal_conv1d-1.5.0.post8+cu12torch2.6cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
54
 
55
  COPY app.py .
56
 
 
3
  # Mirrors the HF Space (ZeroGPU) stack so we can validate the inference path
4
  # locally without the host's CUDA-13/Python-3.12 incompatibilities:
5
  # - Ubuntu 22.04 ships Python 3.10 (= Space's Python)
6
+ # - cu12.8 runtime libs (pre-built torch 2.8.0 cu12 wheels target this)
7
+ # - causal_conv1d wheel for cu12torch2.8 / cp310 / cxx11abi=TRUE
8
+ # (torch >=2.8 ships with cxx11abi=TRUE by default)
9
  #
10
  # Build:
11
  # docker build -t qwen3.5-ocr-jp-2b-local spaces/Qwen3.5-ocr-jp-2b/
 
16
  # qwen3.5-ocr-jp-2b-local
17
  # Open http://localhost:7860
18
 
19
+ FROM nvidia/cuda:12.8.1-devel-ubuntu22.04
20
 
21
  # `devel` (not `runtime`) is required: triton JIT-compiles its CUDA driver
22
  # bindings (`backends/nvidia/driver.c` → `cuda_utils.so`) at first invocation,
 
40
 
41
  WORKDIR /app
42
 
43
+ # Pin torch+vision from the cu12.8 index so the wheel ABI matches our cuda image.
44
  RUN pip install --no-cache-dir \
45
+ --extra-index-url https://download.pytorch.org/whl/cu128 \
46
+ torch==2.8.0 torchvision==0.23.0
47
 
48
  COPY requirements.txt .
49
  RUN pip install --no-cache-dir -r requirements.txt
50
 
51
+ # Pre-install causal_conv1d for fla fast path (Python 3.10 / cu12 / torch 2.8 / cxx11abi=TRUE).
52
  # app.py also tries to install at runtime; this pre-install just makes startup faster.
53
  RUN pip install --no-cache-dir --no-deps \
54
+ https://github.com/Dao-AILab/causal-conv1d/releases/download/v1.6.2.post1/causal_conv1d-1.6.2.post1+cu12torch2.8cxx11abiTRUE-cp310-cp310-linux_x86_64.whl
55
 
56
  COPY app.py .
57