PyTorch container build failing

I am trying to build a PyTorch container based on this script here:GitHub - dusty-nv/jetson-containers: Machine Learning Containers for NVIDIA Jetson and JetPack-L4T. The JetPack versions of the host and container are 5.0.1.

I see the following error during the build:
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python3.8/dist-packages/torch/init.py”, line 198, in
_load_global_deps()
File “/usr/local/lib/python3.8/dist-packages/torch/init.py”, line 151, in _load_global_deps
ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
File “/usr/lib/python3.8/ctypes/init.py”, line 373, in init
self._handle = _dlopen(self._name, mode)
OSError: libcurand.so.10: cannot open shared object file: No such file or directory

Nvidia container runtime has been set as default.

From the documentation here (NVIDIA L4T Base | NVIDIA NGC), I understand that CUDA and other libraries are not mounted from the host starting from JetPack 5 and are being installed in the containers themselves. Where is this happening?

Hi,

It looks like the Torch package is looking for CUDA 10.
But on JetPack 5, the CUDA version is 11.4.

Thanks.

Oh okay. Why would that be?

Also, line 33 here(jetson-containers/docker_base.sh at master · dusty-nv/jetson-containers · GitHub) is this: BASE_IMAGE=“jetpack:r$L4T_VERSION”
Could you please tell me the full URL for this?

Unable to find a JetPack container with tag 34.1.1 here: NVIDIA L4T JetPack | NVIDIA NGC

Hi @virtual.ramblings, JetPack 5.0.1 / L4T R34.1.1 was a Developer Preview build and the jetpack container image isn’t available for it - it’s recommended to upgrade to one of the newer versions of JetPack 5.x.

If you are on JetPack 5.0.2 or newer, you should be able to build the container with the scripts from jetson-containers: https://github.com/dusty-nv/jetson-containers#building-the-containers

The build scripts from jetson-containers set the args in the Dockerfiles dynamically, so the URLs to the base image and PyTorch wheels will be replaced with the appropriate versions for the JetPack release that you are running.

1 Like

Thanks, this is very helpful. Will consider upgrading.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.