Spaces:
Sleeping
Sleeping
Georg
commited on
Commit
·
e8f69fc
1
Parent(s):
711f335
Optimized Docker build to fix OOM errors
Browse files- Dockerfile +12 -1
Dockerfile
CHANGED
|
@@ -17,7 +17,18 @@ ENV MAX_JOBS=1
|
|
| 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'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
RUN python3 -c "import nvdiffrast.torch"
|
| 22 |
RUN rm -rf /tmp/nvdiffrast
|
| 23 |
|
|
|
|
| 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'
|
| 21 |
+
import sysconfig
|
| 22 |
+
from pathlib import Path
|
| 23 |
+
|
| 24 |
+
site = Path(sysconfig.get_paths()["purelib"])
|
| 25 |
+
dist = site / "nvdiffrast-0.0.0.dist-info"
|
| 26 |
+
dist.mkdir(exist_ok=True)
|
| 27 |
+
(dist / "METADATA").write_text("Metadata-Version: 2.1\nName: nvdiffrast\nVersion: 0.0.0\n")
|
| 28 |
+
(dist / "WHEEL").write_text("Wheel-Version: 1.0\nGenerator: manual\nRoot-Is-Purelib: false\nTag: py3-none-any\n")
|
| 29 |
+
(dist / "top_level.txt").write_text("nvdiffrast\n")
|
| 30 |
+
(dist / "RECORD").write_text("")
|
| 31 |
+
PY
|
| 32 |
RUN python3 -c "import nvdiffrast.torch"
|
| 33 |
RUN rm -rf /tmp/nvdiffrast
|
| 34 |
|