# Expecting torch and torchvision for JP6.1

**URL:** <https://community.ultralytics.com/t/expecting-torch-and-torchvision-for-jp6-1/376>\
**Category:** YOLO\
**Tags:** nvidia, jetson, pytorch, support\
**Created:** [October 21, 2024, 12:17pm UTC](https://community.ultralytics.com/t/expecting-torch-and-torchvision-for-jp6-1/376 "2024-10-21T12:17:47Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiapei100](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/jiapei100/32/336_2.png) [@jiapei100](https://community.ultralytics.com/u/jiapei100)\
**Post date:** [October 21, 2024, 12:17pm UTC](https://community.ultralytics.com/t/expecting-torch-and-torchvision-for-jp6-1/376/1 "2024-10-21T12:17:48Z")

</div>

Hi, all:

I noticed [https://docs.ultralytics.com/guides/nvidia-jetson/#install-ultralytics-package](https://docs.ultralytics.com/guides/nvidia-jetson/#install-ultralytics-package), **torch** and **torchvision** now only support **JP6.0**. However, **JP6.1** is already released, please see [https://forums.developer.nvidia.com/t/jetpack-6-1-release-announcement/308185](https://forums.developer.nvidia.com/t/jetpack-6-1-release-announcement/308185) . Can anybody help to build the most up-to-date **torch** and **torchvision** for **JP6.1**?

Cheers

---

<div class="post-metadata">

**Author:** ![BurhanQ](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/burhanq/32/7_2.png) [@BurhanQ](https://community.ultralytics.com/u/BurhanQ)\
**Post date:** [October 21, 2024, 12:49pm UTC](https://community.ultralytics.com/t/expecting-torch-and-torchvision-for-jp6-1/376/2 "2024-10-21T12:49:25Z")

</div>

I would recommend checking the [Jetson Dockerfile](https://github.com/ultralytics/ultralytics/blob/main/docker/Dockerfile-jetson-jetpack6) in the Ultralytics repo for straightforward setup. AFAIK, this _should_ work for any Jetpack version, but to be honest, I’ve never set up a Jetson device personally, you’ll likely need to modify this line in the Dockerfile:

```diff
- FROM nvcr.io/nvidia/l4t-jetpack:r36.3.0
+ FROM nvcr.io/nvidia/l4t-jetpack:r36.4.0

```

Since `r36.4.0` has Jetpack 6.1 according to [this NVIDIA page](https://developer.nvidia.com/embedded/jetson-linux-r3640)

Otherwise, see the [NVIDIA Jetson Download Center](https://developer.nvidia.com/embedded/downloads) for the latest PyTorch version `2.5.0` but doesn’t look like they have a wheel for `torchvision` (yet).

---

<div class="post-metadata">

**Author:** ![jiapei100](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/jiapei100/32/336_2.png) [@jiapei100](https://community.ultralytics.com/u/jiapei100)\
**Post date:** [October 21, 2024, 6:35pm UTC](https://community.ultralytics.com/t/expecting-torch-and-torchvision-for-jp6-1/376/3 "2024-10-21T18:35:14Z")

</div>

@BurhanQ

1. When I run the **docker** file:

```zsh
➜ docker git:(main) sudo docker build -f Dockerfile-jetson-jetpack6 -t pytorch-jetson-jetpack6 .

DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

Sending build context to Docker daemon 32.77kB
Step 1/13 : FROM nvcr.io/nvidia/l4t-jetpack:r36.3.0
 ---> b859f440ba7f
Step 2/13 : ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1 PIP_NO_CACHE_DIR=1 PIP_BREAK_SYSTEM_PACKAGES=1
 ---> Using cache
 ---> 64666bd99085
Step 3/13 : ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.Unicode.ttf /root/.config/Ultralytics/
Downloading [==================================================>] 773.2kB/773.2kB

Downloading [==================================================>] 23.28MB/23.28MB

 ---> Using cache
 ---> 35b818fd7135
Step 4/13 : RUN apt-get update && apt-get install -y --no-install-recommends git python3-pip libopenmpi-dev libopenblas-base libomp-dev && rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 22ac1844de4a
Step 5/13 : WORKDIR /ultralytics
 ---> Using cache
 ---> 97f964c29a89
Step 6/13 : COPY . .
 ---> Using cache
 ---> 8592eebb7d1b
Step 7/13 : RUN sed -i '/^\[http "https:\/\/github\.com\/"\]/,+1d' .git/config
 ---> Running in 5eac5d2a3dc9
sed: can't read .git/config: No such file or directory
The command '/bin/sh -c sed -i '/^\[http "https:\/\/github\.com\/"\]/,+1d' .git/config' returned a non-zero code: 2

```

1. I tried [NVIDIA Jetson Download Center](https://developer.nvidia.com/embedded/downloads) for the latest PyTorch version `2.5.0`. However, when I ran it, I got:

```zsh
➜ python
Python 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.10/dist-packages/torch/ __init__.py", line 361, in <module>
    from torch._C import * # noqa: F403
ImportError: libcusparseLt.so.0: cannot open shared object file: No such file or directory
>>> 

```

---

<div class="post-metadata">

**Author:** ![jiapei100](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/jiapei100/32/336_2.png) [@jiapei100](https://community.ultralytics.com/u/jiapei100)\
**Post date:** [October 21, 2024, 8:24pm UTC](https://community.ultralytics.com/t/expecting-torch-and-torchvision-for-jp6-1/376/4 "2024-10-21T20:24:36Z")

</div>

Thank you @BurhanQ .

I need to overwrite a lot of things, including both the **PyTorch** located in [NVIDIA Jetson Download Center](https://developer.nvidia.com/embedded/downloads) and **TorchVision** … a lot more actually. Now I have

 ![Screenshot from 2024-10-21 13-24-14](https://us1.discourse-cdn.com/flex001/uploads/ultralytics1/original/1X/25f0c5e4082bc2c5eee945a5e8f4f62b8e73a14e.png)

And, tried **YOLO11** as well… Thank you

---

<div class="post-metadata">

**Author:** ![BurhanQ](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/burhanq/32/7_2.png) [@BurhanQ](https://community.ultralytics.com/u/BurhanQ)\
**Post date:** [October 22, 2024, 12:20am UTC](https://community.ultralytics.com/t/expecting-torch-and-torchvision-for-jp6-1/376/5 "2024-10-22T00:20:19Z")

</div>

@jiapei100 glad to hear you got it working! It would be great if you could share the changes you made here or even better, open a PR to include those in the GitHub repo for others.

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/lakshanthad/32/68_2.png) [@lakshanthad](https://community.ultralytics.com/u/lakshanthad)\
**Post date:** [October 28, 2024, 6:30am UTC](https://community.ultralytics.com/t/expecting-torch-and-torchvision-for-jp6-1/376/6 "2024-10-28T06:30:57Z")

</div>

Glad to hear everything is working now @jiapei100. As @BurhanQ mentioned, if you want to update to JetPack6.1 with Docker support, please do the changes. I am currently working on it and will update here once I made it officially available.

FYI: Since JetPack6.1 comes with TensorRT 10.3, you have access to latest TensorRT as well.

Also, for PyTorch and Torchvision, you can look into [this website](http://jetson.webredirect.org/jp6/cu126). You will find the latest `.whl` files there. This is managed by Dustin Franklin from NVIDIA who is famous for [dusty-nv/jetson-containers](https://github.com/dusty-nv/jetson-containers).

So I may update the new JetPack6.1 with these new PyTorch and Torchvision versions as well.

Thanks for your patience.

---

<div class="post-metadata">

**Author:** ![vinura](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/vinura/32/426_2.png) [@vinura](https://community.ultralytics.com/u/vinura)\
**Post date:** [November 25, 2024, 9:21am UTC](https://community.ultralytics.com/t/expecting-torch-and-torchvision-for-jp6-1/376/7 "2024-11-25T09:21:11Z")

</div>

I came across the same problem with Jetson AGX / Jetpack 6.1

I used torch from Dustin’s Site.

```auto
wget http://jetson.webredirect.org/jp6/cu126/+f/5cf/9ed17e35cb752/torch-2.5.0-cp310-cp310-linux_aarch64.whl#sha256=5cf9ed17e35cb7523812aeda9e7d6353c437048c5a6df1dc6617650333049092

pip install torch-2.5.0-cp310-cp310-linux_aarch64.whl

```

then installed them respective torchvision from Dustin’s site.

```auto
wget http://jetson.webredirect.org/jp6/cu126/+f/5f9/67f920de3953f/torchvision-0.20.0-cp310-cp310-linux_aarch64.whl#sha256=5f967f920de3953f2a39d95154b1feffd5ccc06b4589e51540dc070021a9adb9

pip install torchvision-0.20.0-cp310-cp310-linux_aarch64.wh

```

then installed onnxruntime 1.20 from justin s site.

```auto
wget http://jetson.webredirect.org/jp6/cu126/+f/0c4/18beb3326027d/onnxruntime_gpu-1.20.0-cp310-cp310-linux_aarch64.whl#sha256=0c418beb3326027d83acc283372ae42ebe9df12f71c3a8c2e9743a4e323443a4

pip install onnxruntime_gpu-1.20.0-cp310-cp310-linux_aarch64.whl

```

Downgraded the numpy as usual.

and lastly installed libcusparselt0 from nvidia site.

> **[cuSPARSELt Downloads](https://developer.nvidia.com/cusparselt-downloads?target_os=Linux&target_arch=aarch64-jetson&Compilation=Native&Distribution=Ubuntu&target_version=22.04&target_type=deb_network)**

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/lakshanthad/32/68_2.png) [@lakshanthad](https://community.ultralytics.com/u/lakshanthad)\
**Post date:** [December 18, 2024, 6:19pm UTC](https://community.ultralytics.com/t/expecting-torch-and-torchvision-for-jp6-1/376/8 "2024-12-18T18:19:04Z")

</div>

Hello @jiapei100 We have updated with JetPack6.1 which includes TensorRT 10.3 support with Docker:

> <https://github.com/ultralytics/ultralytics/blob/main/docker/Dockerfile-jetson-jetpack6>

This will do the job!

```sh
t=ultralytics/ultralytics:latest-jetson-jetpack6
sudo docker pull $t && sudo docker run -it --ipc=host --runtime=nvidia $t

```

Thanks for waiting!

CC: @BurhanQ

---

<div class="post-metadata">

**Author:** ![Venkat1405](https://avatars.discourse-cdn.com/v4/letter/v/85f322/32.png) [@Venkat1405](https://community.ultralytics.com/u/Venkat1405)\
**Post date:** [December 19, 2024, 1:20pm UTC](https://community.ultralytics.com/t/expecting-torch-and-torchvision-for-jp6-1/376/9 "2024-12-19T13:20:40Z")

</div>

Downgraded to which version of numpy i am facing error with c-api in torch

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/lakshanthad/32/68_2.png) [@lakshanthad](https://community.ultralytics.com/u/lakshanthad)\
**Post date:** [December 20, 2024, 5:44pm UTC](https://community.ultralytics.com/t/expecting-torch-and-torchvision-for-jp6-1/376/10 "2024-12-20T17:44:42Z")

</div>

Hi @Venkat1405,

It should be `numpy 1.23.5`.

We are already handling that here when you do `pip install ultralytics[export]` on the Jetson:

> <https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml#L108>
