Georg commited on
Commit
f895f87
·
1 Parent(s): c05ac4f

Fix nvdiffrast OOM: set MAX_JOBS=1 before compilation

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -9,13 +9,14 @@ ENV USE_REAL_MODEL=true
9
  # Ensure NumPy 1.x for CUDA extension compatibility
10
  RUN pip install --no-cache-dir "numpy<2"
11
 
 
 
 
12
  # Install nvdiffrast (CUDA rasterizer) - needs GPU, build here
13
- RUN pip install --no-cache-dir --no-build-isolation git+https://github.com/NVlabs/nvdiffrast.git
14
 
15
  # Build CUDA extensions (requires GPU - only part that needs HuggingFace GPU)
16
- # MAX_JOBS=1 to reduce memory usage during compilation
17
  WORKDIR /app/FoundationPose
18
- ENV MAX_JOBS=1
19
  RUN cd bundlesdf/mycuda && pip install . --no-build-isolation
20
 
21
  # Note: mycpp build, weights download, and build deps are already in base image
 
9
  # Ensure NumPy 1.x for CUDA extension compatibility
10
  RUN pip install --no-cache-dir "numpy<2"
11
 
12
+ # Set MAX_JOBS=1 BEFORE any CUDA compilation to limit memory usage
13
+ ENV MAX_JOBS=1
14
+
15
  # Install nvdiffrast (CUDA rasterizer) - needs GPU, build here
16
+ RUN pip install --no-cache-dir git+https://github.com/NVlabs/nvdiffrast.git
17
 
18
  # Build CUDA extensions (requires GPU - only part that needs HuggingFace GPU)
 
19
  WORKDIR /app/FoundationPose
 
20
  RUN cd bundlesdf/mycuda && pip install . --no-build-isolation
21
 
22
  # Note: mycpp build, weights download, and build deps are already in base image