Spaces:
Sleeping
Sleeping
Georg commited on
Commit ·
711f335
1
Parent(s): 971c84e
Optimized Docker build to fix OOM errors
Browse files- Dockerfile +4 -4
Dockerfile
CHANGED
|
@@ -16,10 +16,10 @@ ENV MAX_JOBS=1
|
|
| 16 |
# Install nvdiffrast (CUDA rasterizer) - needs GPU, build here
|
| 17 |
RUN git clone --depth 1 https://github.com/NVlabs/nvdiffrast.git /tmp/nvdiffrast \
|
| 18 |
&& cd /tmp/nvdiffrast \
|
| 19 |
-
&& python3 setup.py install
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
|
| 24 |
# Build CUDA extensions (requires GPU - only part that needs HuggingFace GPU)
|
| 25 |
WORKDIR /app/FoundationPose
|
|
|
|
| 16 |
# Install nvdiffrast (CUDA rasterizer) - needs GPU, build here
|
| 17 |
RUN git clone --depth 1 https://github.com/NVlabs/nvdiffrast.git /tmp/nvdiffrast \
|
| 18 |
&& cd /tmp/nvdiffrast \
|
| 19 |
+
&& python3 setup.py install
|
| 20 |
+
RUN python3 - <<'PY'\nimport sysconfig\nfrom pathlib import Path\nsite = Path(sysconfig.get_paths()[\"purelib\"])\ndist = site / \"nvdiffrast-0.0.0.dist-info\"\ndist.mkdir(exist_ok=True)\n(dist / \"METADATA\").write_text(\"Metadata-Version: 2.1\\nName: nvdiffrast\\nVersion: 0.0.0\\n\")\n(dist / \"WHEEL\").write_text(\"Wheel-Version: 1.0\\nGenerator: manual\\nRoot-Is-Purelib: false\\nTag: py3-none-any\\n\")\n(dist / \"top_level.txt\").write_text(\"nvdiffrast\\n\")\n(dist / \"RECORD\").write_text(\"\")\nPY
|
| 21 |
+
RUN python3 -c "import nvdiffrast.torch"
|
| 22 |
+
RUN rm -rf /tmp/nvdiffrast
|
| 23 |
|
| 24 |
# Build CUDA extensions (requires GPU - only part that needs HuggingFace GPU)
|
| 25 |
WORKDIR /app/FoundationPose
|