instant-ngp
instant-ngp copied to clipboard
OOM while opening devcontainer
While opening the remote container via VSCode, my system RAM (32GB RAM + 8GB swap) gets exhausted ~11 minutes into this step:
https://github.com/NVlabs/instant-ngp/blob/dad59f5d771251ea30fb1e5dfcd54826c2fb643c/.devcontainer/Dockerfile#L54
Is there some way to avoid this?
I tried compiling without PGO by changing from ./configure --enable-optimizations to ./configure only. This avoid the OOM. The weird thing is the OOM does not occur on my WSL2 Docker setup, only on my Linux Docker setup. This hints at either an upstream issue with Docker or Remote Containers.
However, subsequently, checkinstall fails with this:
Looking in links: /tmp/tmp2rkqkjx3
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-10.0.1 setuptools-39.0.1
Exception:
Traceback (most recent call last):
File "/tmp/tmp2rkqkjx3/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/basecommand.py", line 228, in main
status = self.run(options, args)
File "/tmp/tmp2rkqkjx3/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/commands/install.py", line 377, in run
wheel_cache.cleanup()
File "/tmp/tmp2rkqkjx3/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/utils/temp_dir.py", line 58, in __exit__
self.cleanup()
File "/tmp/tmp2rkqkjx3/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/utils/temp_dir.py", line 81, in cleanup
rmtree(self.path)
File "/tmp/tmp2rkqkjx3/pip-10.0.1-py2.py3-none-any.whl/pip/_vendor/retrying.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "/tmp/tmp2rkqkjx3/pip-10.0.1-py2.py3-none-any.whl/pip/_vendor/retrying.py", line 212, in call
raise attempt.get()
File "/tmp/tmp2rkqkjx3/pip-10.0.1-py2.py3-none-any.whl/pip/_vendor/retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "/tmp/tmp2rkqkjx3/pip-10.0.1-py2.py3-none-any.whl/pip/_vendor/six.py", line 693, in reraise
raise value
File "/tmp/tmp2rkqkjx3/pip-10.0.1-py2.py3-none-any.whl/pip/_vendor/retrying.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "/tmp/tmp2rkqkjx3/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/utils/misc.py", line 108, in rmtree
onerror=rmtree_errorhandler)
File "/opt/Python-3.7.0/Lib/shutil.py", line 485, in rmtree
_rmtree_safe_fd(fd, path, onerror)
File "/opt/Python-3.7.0/Lib/shutil.py", line 423, in _rmtree_safe_fd
_rmtree_safe_fd(dirfd, fullname, onerror)
File "/opt/Python-3.7.0/Lib/shutil.py", line 423, in _rmtree_safe_fd
_rmtree_safe_fd(dirfd, fullname, onerror)
File "/opt/Python-3.7.0/Lib/shutil.py", line 443, in _rmtree_safe_fd
onerror(os.unlink, fullname, sys.exc_info())
File "/opt/Python-3.7.0/Lib/shutil.py", line 441, in _rmtree_safe_fd
os.unlink(entry.name, dir_fd=topfd)
FileNotFoundError: [Errno 2] No such file or directory: '_vendor'
Makefile:1122: recipe for target 'install' failed
make: *** [install] Error 2
This issue does not occur if I run make install instead of make before running checkinstall again after, but that probably messes up the package manager state a bit since make install actually installs the package. This hints at an issue with CPython...
Either way, if its an issue with Docker, Remote Containers or CPython, I have no idea where to begin chasing it. is it actually necessary to compile Python from source for this project?
FYI, I updated PYTHON_VERSION to 3.7.14 (the latest 3.7), tried to build the docker image again, and this error went away.