SteEsp commited on
Commit
71aed00
·
verified ·
1 Parent(s): 78d2329

Fix build OOM: compile CUDA for A10G arch only, cap MAX_JOBS

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -4
Dockerfile CHANGED
@@ -17,10 +17,13 @@ FROM nvidia/cuda:12.8.0-devel-ubuntu22.04
17
  ENV DEBIAN_FRONTEND=noninteractive \
18
  PYTHONUNBUFFERED=1 \
19
  PIP_NO_CACHE_DIR=1 \
20
- # Compile the CUDA extensions for every GPU a Space may run on
21
- # (T4 7.5 · A100 8.0 · A10G 8.6 · L4/L40S 8.9 · H100 9.0). Trim this to
22
- # your chosen GPU to shorten the build.
23
- TORCH_CUDA_ARCH_LIST="7.5 8.0 8.6 8.9 9.0+PTX"
 
 
 
24
 
25
  # Build tools + extension headers (libglm-dev) and the OpenCV runtime libs
26
  # (libgl1, libglib2.0-0 — optgs's COLMAP loader imports cv2).
 
17
  ENV DEBIAN_FRONTEND=noninteractive \
18
  PYTHONUNBUFFERED=1 \
19
  PIP_NO_CACHE_DIR=1 \
20
+ # Build CUDA kernels for the A10G (compute 8.6) only; +PTX keeps them
21
+ # forward-compatible with newer GPUs via driver JIT. Compiling all
22
+ # architectures at once OOM-kills the HF builder.
23
+ TORCH_CUDA_ARCH_LIST="8.6+PTX" \
24
+ # Cap parallel nvcc jobs — gsplat's kernels are memory-heavy and the HF
25
+ # Docker builder has limited RAM; an unbounded build gets OOM-killed.
26
+ MAX_JOBS=2
27
 
28
  # Build tools + extension headers (libglm-dev) and the OpenCV runtime libs
29
  # (libgl1, libglib2.0-0 — optgs's COLMAP loader imports cv2).