# PyTorch container build failing

**URL:** <https://forums.developer.nvidia.com/t/pytorch-container-build-failing/255813>\
**Category:** Jetson AGX Orin\
**Tags:** pytorch, containers\
**Created:** [June 7, 2023, 7:15am UTC](https://forums.developer.nvidia.com/t/pytorch-container-build-failing/255813 "2023-06-07T07:15:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![virtual.ramblings](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@virtual.ramblings](https://forums.developer.nvidia.com/u/virtual.ramblings)\
**Post date:** [June 7, 2023, 7:15am UTC](https://forums.developer.nvidia.com/t/pytorch-container-build-failing/255813/1 "2023-06-07T07:15:23Z")

</div>

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](https://github.com/dusty-nv/jetson-containers/tree/master). 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](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-base)), 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?

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [June 7, 2023, 8:22am UTC](https://forums.developer.nvidia.com/t/pytorch-container-build-failing/255813/3 "2023-06-07T08:22:59Z")

</div>

Hi,

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

Thanks.

---

<div class="post-metadata">

**Author:** ![virtual.ramblings](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@virtual.ramblings](https://forums.developer.nvidia.com/u/virtual.ramblings)\
**Post date:** [June 7, 2023, 8:33am UTC](https://forums.developer.nvidia.com/t/pytorch-container-build-failing/255813/4 "2023-06-07T08:33:01Z")

</div>

Oh okay. Why would that be?

Also, line 33 here([jetson-containers/docker\_base.sh at master · dusty-nv/jetson-containers · GitHub](https://github.com/dusty-nv/jetson-containers/blob/master/scripts/docker_base.sh)) 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](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-jetpack/tags)

---

<div class="post-metadata">

**Author:** ![dusty\_nv](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/dusty_nv/32/14043_2.png) [@dusty\_nv](https://forums.developer.nvidia.com/u/dusty_nv)\
**Post date:** [June 7, 2023, 3:42pm UTC](https://forums.developer.nvidia.com/t/pytorch-container-build-failing/255813/5 "2023-06-07T15:42:36Z")

</div>

> [@virtual.ramblings](#):
>
> Unable to find a JetPack container with tag 34.1.1 here: [NVIDIA L4T JetPack | NVIDIA NGC](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-jetpack/tags)

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](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.

---

<div class="post-metadata">

**Author:** ![virtual.ramblings](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@virtual.ramblings](https://forums.developer.nvidia.com/u/virtual.ramblings)\
**Post date:** [June 8, 2023, 5:29am UTC](https://forums.developer.nvidia.com/t/pytorch-container-build-failing/255813/7 "2023-06-08T05:29:45Z")

</div>

Thanks, this is very helpful. Will consider upgrading.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [June 28, 2023, 5:42am UTC](https://forums.developer.nvidia.com/t/pytorch-container-build-failing/255813/9 "2023-06-28T05:42:44Z")

</div>

Closed on June 28, 2023, 5:42am UTC

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