Cant install Pytorch on JetsonNano P3450

Hello.I tried to install Pytorch to execute my programm on gpu, but i couldnt.
I used instructions:

Sequence of my actions:

  1. sudo apt-get -y update;

2.sudo apt-get -y install autoconf bc build-essential g+±8 gcc-8 clang-8 lld-8 gettext-base gfortran-8 iputils-ping libbz2-dev libc+±dev libcgal-dev libffi-dev libfreetype6-dev libhdf5-dev libjpeg-dev liblzma-dev libncurses5-dev libncursesw5-dev libpng-dev libreadline-dev libssl-dev libsqlite3-dev libxml2-dev libxslt-dev locales moreutils openssl python-openssl rsync scons python3-pip libopenblas-dev;

  1. conda create --name pytorch3.8 python==3.8

4.conda activate pytorch3.8

5.export TORCH_INSTALL=/home/atlas/Downloads/torch-2.0.0+nv23.05-cp38-cp38-linux_aarch64.whl
[I downloaded PyTorch v2.0.0 from here: PyTorch for Jetson . It was downloaded in: =/home/atlas/Downloads/]

6.python3 -m pip install --upgrade pip; python3 -m pip install aiohttp numpy==‘1.19.4’ scipy==‘1.5.3’ export “LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:$LD_LIBRARY_PATH”; python3 -m pip install --upgrade protobuf; python3 -m pip install --no-cache $TORCH_INSTALL

7.python

8.import torch

And as a result:


I have jetpack: 5.1.2-b.104.It was updated.Before update i had jetpack 4.6. I decided to upgrade it, because this version wasnt in the list from here PyTorch for Jetson
!jetpack

Also I tried to get version from here [Installing PyTorch for Jetson Platform - NVIDIA Docs] too, but the result was same.

Besides this, i tried to install pytorch in main folder (without using of anaconda) but the resul t was same.

And finally, i tried: pip install torch, but as a result:
1.Python ```
2.torch.cuda.is_available()
3.False

My questions:

1.How to fix:
[ERROR: Invalid requirement: ‘LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:’
Hint: It looks like a path. File ‘LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:’ does not exist.]
If it does not exist can i just create empty folder with this name to fix this?

2.Maybe version of pytorch wheel incompatible with my JetPack version?If so, where can i get and how can i install correct version of JetPack [for my pytorch version] or pytorch [for my JetPack version]?

3.[General]What did o do wrong and how to install Pytorch on my Jetson Nano to execute my programm on gpu?

4.Or maybe my sequence of actions was wrong from the start and i dont even need pytorch to execute my programm on gpu?If so, how can i execute my programm on GPU?

Hi,

JetPack 5 doesn’t support Jetson Nano. Please use JetPack 4.

It’s recommended to use our prebuilt which has enabled the CUDA support.
But we only provide the PyTorch package for the default Python version.
For JetPack 4, it’s Python 3.6.

Thanks.

Hi.Thanks for your answer.I tried to install pytorch again from clear clone of my sd card but attempt failed.
Sequence of my actions:
1.sudo apt dist-upgrade

2.sudo apt update

3.sudo apt-get install nvidia-container

4.sudo apt-get install nvidia-jetpack

5.My jetpack version is 4.6.1

5.Download PyTorch v1.10.0 from here PyTorch for Jetson

6.sudo apt-get -y install autoconf bc build-essential g+±8 gcc-8 clang-8 lld-8 gettext-base gfortran-8 iputils-ping libbz2-dev libc+±dev libcgal-dev libffi-dev libfreetype6-dev libhdf5-dev libjpeg-dev liblzma-dev libncurses5-dev libncursesw5-dev libpng-dev libreadline-dev libssl-dev libsqlite3-dev libxml2-dev libxslt-dev locales moreutils openssl python-openssl rsync scons python3-pip libopenblas-dev;

7.conda create -n pytorch3.6.7 -c conda-forge python=3.6.7

8.conda activate pytorch3.6.7

9.export TORCH_INSTALL=/home/atlas/Downloads/torch-1.10.0-cp36-cp36m-linux_aarch64.whl

10.python3 -m pip install --upgrade pip; python3 -m pip install aiohttp numpy==‘1.19.4’ scipy==‘1.5.3’ export “LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:$LD_LIBRARY_PATH”; python3 -m pip install --upgrade protobuf; python3 -m pip install --no-cache $TORCH_INSTALL

As a result:


(Same error +a lot of other errors)

[ERROR: Invalid requirement: ‘LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:’
Hint: It looks like a path. File ‘LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:’ does not exist.]
But it exists.Dont know how to fix.

My questins:

1.Why attempt failed?Wrong version again?How to fix it?

2.Which version of jetpack do i need exactly: 4.2, 4.3. , 4.4, 4.4.1, 4.5 , 4.6 , … , or maybe another version and how can i install correct version of jetpack?I can edit file etc/apt/sources.list.d/nvidia-l4t-apt-source.list and use : sudo apt update
sudo apt dist-upgrade
sudo apt install --fix-broken -o Dpkg::Options::=“–force-overwrite”

to install specific version,but i dont know what to write instead of r35.4.

https://docs.nvidia.com/jetson/jetpack/install-jetpack/index.html

3.Which version of pytorch do i need exactly and how can i install it?Can i get it from here: PyTorch for Jetson ?

4.{It’s recommended to use our prebuilt which has enabled the CUDA support.}
How can i install prebuild?

@A98 your screenshot shows that you are missing libmpi_cxx.so, have you tried installing libopenmpi-dev from apt like shown in the PyTorch for Jetson thread?

If you continue having problems, you could also try using the l4t-pytorch container, which already includes PyTorch and torchvision pre-installed:

Thanks a lot for your reply.I followed instructions and installed pytorch.(But my sequence of actions was different. I will show it later)
As aresult:
python
import torch
print(torch.version)
print('CUDA available: ’ + str(torch.cuda.is_available()))
True

But i have 1 more problem.I also need open cv, and after command
[pip install opencv] building wheel for opencv-python runs forever. Could you explain me how can i fix it? Or maybe I just need to waitf for 3-5 hours?

@A98 glad you got PyTorch installed with CUDA enabled! OpenCV and cv2 should already be installed on the SD card image that you flashed. If you try installing it via pip, yea it will probably try to build it (and take awhile). You could also install it from apt instead (pre-built)

If you’re going to wait around for it to build OpenCV, you my as well build it yourself with CUDA enabled: GitHub - mdegans/nano_build_opencv: Build OpenCV on Nvidia Jetson Nano

Thanks for your reply.I have 1 more problem -no module named cv2 error and multiple errors.[Check pictures below]


Sequenece of my actions:
Pytorch install:

1.conda create -n pytorch3.6 -c conda-forge python=3.6

2.conda activate pytorch3.6

3.pip install --upgrade pip

[instructions : PyTorch for Jetson]

4.wget https://nvidia.box.com/shared/static/p57jwntv436lfrd78inwl7iml6p13fzh.whl -O torch-1.8.0-cp36-cp36m-linux_aarch64.whl

5.sudo apt-get install python3-pip libopenblas-base libopenmpi-dev libomp-dev

6.sudo apt-get install libomp5

7.pip3 install Cython

  1. pip3 install numpy torch-1.8.0-cp36-cp36m-linux_aarch64.whl

9.pip install Pillow

10.pip install cmake

  1. pip3 install numpy torch-1.8.0-cp36-cp36m-linux_aarch64.whl

12.python.

  1. import torch

  2. print(torch.version)

15.print('CUDA available: ’ + str(torch.cuda.is_available()))

16.pip install opencv-python

  1. pip install opencv-python was interrupted after 1 hour.

18.pip install jupyterlab

  1. jupyter lab

I ignored all these errors and jupiter lab was launched.(So ,in my point of view, i can keep ignore these errors).But i need cv2 module and thats why i tried to: ‘’ pip install opencv-python’’ .But process was interrupted after 1 hour.

I also tried to repeat all steps without pip install opencv-python, but the result was same.So cv2 module didnt install by default.

Commands sudo apt-get install python3-opencv and sudo apt-get install python-opencv didnt help.
As a result:
1.Python
2.import cv2
3.import error no module cv2

How can i install it?How can i fix errors during installation of jupyter lab [ Can i ignore them]?

I got it.Problem in python 3.6.I installed open-cv in new venv with python 3.7.1 without any problems by: pip install opencv-python.Building wheels infinite for python 3.6 only.So Do you have pytorch version for python 3.7.1 and jetpack 4.6.1 or do you have specific version of open-cv for python 3.6?

I found specific version of opencv and installed it [Ipython3 -m pip install opencv-python==4.6.0.66 --verbose].

Now i have all necessry components to execute my programm on GPU.But i still have problem.

,but i still have problem.
I have 128GB sd card and i wrote image on this sd card [I followed instructions [Get Started With Jetson Nano Developer Kit | NVIDIA Developer](Get Started With Jetson Nano Developer Kit | NVIDIA Developer)]
But i have very few memory.
As a result i cant execute my programm with error:

I dont event try to train programm, i already have pretrained model.

Why i have only 3.9 GB on my 128 GB sd card?
How can i fix it?Maybe i need specific image for 128GB sd card?
If so, where can i get it?

@A98 that is saying you have 3.9GB of system memory (total) - not disk space. Your program seems to be trying to allocate more RAM that your Jetson Nano has available. You could try mounting swap and disabling desktop GUI to free up more memory: https://github.com/dusty-nv/jetson-containers/blob/master/docs/setup.md#mounting-swap

Thanks for you reply.So sd cards provide only disk space and i cant get more system memory even on 256 GB sd card?I will try to use mountgin swap: Adding Swap Space on Ubuntu 20.04: A Tutorial • CloudSigma

Your SD card is disk storage, not system memory. You can mount swap memory on your SD card, but there’s a limit to which memory can be swapped out to disk.

I did 2 GB swap and disable desktop.
Unfortunatelly still not enough.


Is it over, or i can increase available RAM other way?
[I am trying to use model trained on cifar-10 data set]

You can try increasing the swap from 2GB to 4GB or more and see if that helps, otherwise you would need to change the script you are running so that it uses less memory. In other tutorials, we train full PyTorch models on Nano, so perhaps the script is doing something inefficient?

Sorry, for off topic comment, but , yes, my script is ineffective.It is image classification script, which classifies pictures on 10 classes = (‘plane’, ‘car’, ‘bird’, ‘cat’,
‘deer’, ‘dog’, ‘frog’, ‘horse’, ‘ship’, ‘truck’).

It was trained on dataset cifar-10 with buch size=128 and and that’s why is is ineffective: i have to add 127 zero tensors to classifie only 1 picture, because it cant work with 1 image.[And model trained on batch size=1 has extremly low accuracy]

image1=torch.zeros([128, 3, 224, 224],dtype=torch.float) [Zero tensors]
image1[0]=image [Real image converted into tensor;I need only this but model just doesnt work with 1 image]

HI.
I also used instruction from documentation Installing PyTorch for Jetson Platform - NVIDIA Docs.

But I have another error, which author of this topic doesn’t have (This is great for him =) ) So, I hope, you can help me.

python3 -m pip install --upgrade pip; python3 -m pip install aiohttp numpy=='1.19.4' scipy=='1.5.3' export "LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:$LD_LIBRARY_PATH"; python3 -m pip install --upgrade protobuf; python3 -m pip install --no-cache $TORCH_INSTALL
Collecting pip
  Downloading https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl (1.7MB)
    100% |████████████████████████████████| 1.7MB 278kB/s 
Installing collected packages: pip
Successfully installed pip-21.3.1
Defaulting to user installation because normal site-packages is not writeable
ERROR: Invalid requirement: 'LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:'
Hint: It looks like a path. File 'LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:' does not exist.
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: protobuf in /usr/lib/python3/dist-packages (3.0.0)
Collecting protobuf
  Downloading protobuf-3.19.6-py2.py3-none-any.whl (162 kB)
     |████████████████████████████████| 162 kB 2.3 MB/s            
Installing collected packages: protobuf
Successfully installed protobuf-3.19.6
Defaulting to user installation because normal site-packages is not writeable
ERROR: torch-2.0.0+nv23.05-cp38-cp38-linux_aarch64.whl is not a supported wheel on this platform.

If we speak about python:

python -c "import struct;print( 8 * struct.calcsize('P'))"
64

If we speak about nvidia-jetpack version:

sudo apt-cache show nvidia-jetpack
[sudo] password for jetson: 
Package: nvidia-jetpack
Version: 4.6.4-b39
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-l4t-jetson-multimedia-api (>> 32.7-0), nvidia-l4t-jetson-multimedia-api (<< 32.8-0), nvidia-cuda (= 4.6.4-b39), nvidia-tensorrt (= 4.6.4-b39), nvidia-nsight-sys (= 4.6.4-b39), nvidia-cudnn8 (= 4.6.4-b39), nvidia-opencv (= 4.6.4-b39), nvidia-container (= 4.6.4-b39), nvidia-visionworks (= 4.6.4-b39), nvidia-vpi (= 4.6.4-b39)
Homepage: http://developer.nvidia.com/jetson
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_4.6.4-b39_arm64.deb
Size: 29388
SHA256: adf7a6660f73cdc4f95bc15c48d8588688e3afa5ee18bfd5b3a3caa3a458aa02
SHA1: 5abbe0df74f71579c1a0ee30ab7c2c236e1bcdbb
MD5sum: ec293a56d17f2b2793448d621811330d
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8

Package: nvidia-jetpack
Version: 4.6.3-b17
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-l4t-jetson-multimedia-api (>> 32.7-0), nvidia-l4t-jetson-multimedia-api (<< 32.8-0), nvidia-cuda (= 4.6.3-b17), nvidia-tensorrt (= 4.6.3-b17), nvidia-nsight-sys (= 4.6.3-b17), nvidia-cudnn8 (= 4.6.3-b17), nvidia-opencv (= 4.6.3-b17), nvidia-container (= 4.6.3-b17), nvidia-vpi (= 4.6.3-b17)
Homepage: http://developer.nvidia.com/jetson
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_4.6.3-b17_arm64.deb
Size: 29368
SHA256: 694254a8667ebbf13852548bdd13a5b8ae61481ac059845b706398eefdcb9e01
SHA1: 67140fc8463ec61fd69352b225244b639c799edd
MD5sum: afa1382b6caded6b736d494fc481bab4
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8

Package: nvidia-jetpack
Version: 4.6.2-b5
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-cuda (= 4.6.2-b5), nvidia-opencv (= 4.6.2-b5), nvidia-cudnn8 (= 4.6.2-b5), nvidia-tensorrt (= 4.6.2-b5), nvidia-visionworks (= 4.6.2-b5), nvidia-container (= 4.6.2-b5), nvidia-vpi (= 4.6.2-b5), nvidia-l4t-jetson-multimedia-api (>> 32.7-0), nvidia-l4t-jetson-multimedia-api (<< 32.8-0)
Homepage: http://developer.nvidia.com/jetson
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_4.6.2-b5_arm64.deb
Size: 29378
SHA256: 925f4abff97e6024d86cff3b9e132e7c7554d05fb83590487381b7e925d5b2bb
SHA1: e3ef727e87df5c331aece34508c110d57d744fe9
MD5sum: 7cb2e387af41bc8143ac7b6525af7794
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8

Package: nvidia-jetpack
Version: 4.6.1-b110
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-cuda (= 4.6.1-b110), nvidia-opencv (= 4.6.1-b110), nvidia-cudnn8 (= 4.6.1-b110), nvidia-tensorrt (= 4.6.1-b110), nvidia-visionworks (= 4.6.1-b110), nvidia-container (= 4.6.1-b110), nvidia-vpi (= 4.6.1-b110), nvidia-l4t-jetson-multimedia-api (>> 32.7-0), nvidia-l4t-jetson-multimedia-api (<< 32.8-0)
Homepage: http://developer.nvidia.com/jetson
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_4.6.1-b110_arm64.deb
Size: 29366
SHA256: acfd9e75af780eab165361d61de4b4fe4974890864fe191060b402ac4c2f54d5
SHA1: a016568ac53705acc145a9f7e60505707bea259f
MD5sum: 79be976b184a8c885bd9169ea5b7fb7b
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8

Thank you for your future thoughts.

Hi @s.pinchuk, you are trying to install a PyTorch wheel built for JetPack 5 on JetPack 4.

Instead, please install one of the wheels for JetPack 4 from here: PyTorch for Jetson

1 Like

Hello!
I installed torch, as you said. But when I buld my project I always have such errors:

make build
build-bridge is running...
./scripts/build-bridges.sh
+ mkdir -p ./libs
+ echo 'Building OpenCV bridge for Go...'
Building OpenCV bridge for Go...
++ pkg-config --cflags --libs opencv4
+ g++ -std=c++11 -fPIC -shared ./internal/ccv/bridges/bridge.cpp -o ./libs/cv_lib_brdige.so -I/usr/include/opencv4/opencv -I/usr/include/opencv4 -lopencv_dnn -lopencv_gapi -lopencv_highgui -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_stitching -lopencv_video -lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_videoio -lopencv_imgcodecs -lopencv_imgproc -lopencv_core
+ echo 'Building Models bridge for Go...'
Building Models bridge for Go...
+ [[ prod == \p\r\o\d ]]
+ ./internal/models/build.sh
+++ dirname ./internal/models/build.sh
++ realpath ./internal/models
+ BASE_DIR=/home/jetson/projects/RnD_Jetson_optimization/internal/models
+ OUT_PATH=/home/jetson/projects/RnD_Jetson_optimization/internal/models/out
+ echo 'Building SuperPoint bridge for Go...'
Building SuperPoint bridge for Go...
+ mkdir -p /home/jetson/projects/RnD_Jetson_optimization/internal/models/out
+ g++ -std=c++17 -fPIC -shared /home/jetson/projects/RnD_Jetson_optimization/internal/models/bridges/demo.cpp -o /home/jetson/projects/RnD_Jetson_optimization/internal/models/out/libmodels.so -ltorch -lc10 -ltorch_cpu
/home/jetson/projects/RnD_Jetson_optimization/internal/models/bridges/demo.cpp:1:10: fatal error: torch/script.h: No such file or directory
#include <torch/script.h>
         ^~~~~~~~~~~~~~~~
compilation terminated.
+ cp -f './internal/models/out/*.so' ./libs/
cp: cannot stat './internal/models/out/*.so': No such file or directory
+ rm -rf ./internal/models/out
go build cmd/main.go
# command-line-arguments
/usr/local/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
gcc: error: ./libs/libmodels.so: No such file or directory

Makefile:83: recipe for target 'build-app' failed
make: *** [build-app] Error 1

In environment variables I have:

export LIBRARY_PATH=home/jetson/projects/RnD_Jetson_optimization/internal/models/libs/libtorch/lib
export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/opencv.pc

Maybe for torch I also need some env variables?

I think you need to adjust your paths for libtorch - you should find them under:

  • /usr/local/lib/python3.6/dist-packages/torch/include
  • /usr/local/lib/python3.6/dist-packages/torch/lib

(or under whatever package dir pip3 show torch shows)

Thanks I solved old error, but I have new one:

sudo docker build -t jetson-build -f Jetson.Dockerfile .
[+] Building 1.2s (2/3)                                                                                                                                docker:desktop-linux
[+] Building 1.4s (3/3) FINISHED                                                                                                                       docker:desktop-linux
 => [internal] load .dockerignore                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                        0.0s
 => [internal] load build definition from Jetson.Dockerfile                                                                                                            0.0s
 => => transferring dockerfile: 1.24kB                                                                                                                                 0.0s
 => ERROR [internal] load metadata for nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3                                                                                   1.3s
------
 > [internal] load metadata for nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3:
------
Jetson.Dockerfile:1
--------------------
   1 | >>> FROM nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3 as base
   2 |     
   3 |     RUN apt-get update && apt-get upgrade -yy && apt-get install -yy \
--------------------
ERROR: failed to solve: nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3: error getting credentials - err: exit status 1, out: ``

Before build command I have already downloaded needful library

% docker pull nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3
r35.2.1-pth2.0-py3: Pulling from nvidia/l4t-pytorch
f04b4bbe1580: Pulling fs layer 
0a1def070f0b: Pulling fs layer 
f0d41bdab50f: Pulling fs layer 
6328a89a71f9: Pulling fs layer 
f7adbdc55099: Pulling fs layer 
4d9a358decc4: Pulling fs layer 
3dfc1c856868: Pulling fs layer 
ef8e5ac0e0fe: Pulling fs layer 
acffb039d986: Pulling fs layer 
cb612f8e41f4: Pulling fs layer 
99daf550d19b: Pulling fs layer 
b25e20cd391d: Pulling fs layer 
3e8e9bd0cf8c: Pulling fs layer 
8455eaf2ad8c: Pulling fs layer 
de9760151109: Pulling fs layer 
7b33b2edf791: Pulling fs layer 
3dfc1c856868: Waiting 
ef8e5ac0e0fe: Waiting 
acffb039d986: Waiting 
cb612f8e41f4: Waiting 
a692693c4aa7: Pulling fs layer 
cc31f854225f: Pulling fs layer 
99daf550d19b: Waiting 
6eb6de2d9d95: Pulling fs layer 
d955bda23ac2: Pulling fs layer 
b25e20cd391d: Waiting 
3e8e9bd0cf8c: Waiting 
9e8a99aa6616: Pulling fs layer 
a0755e308026: Pull complete 
fc2a243718a3: Pull complete 
2974057b6b3e: Pull complete 
caa6e94b90bd: Pull complete 
f3d6fb7b5668: Pull complete 
fd2d18fde7a9: Pull complete 
b666c3392147: Pull complete 
9029af33b5d8: Pull complete 
f7cffb8e669c: Pull complete 
a1e885b18900: Pull complete 
e159154ecb01: Pull complete 
Digest: sha256:545a0f62fb4a5fd2d8c511134f6c55d451ae1565075dcc67123b0c422a469472
Status: Downloaded newer image for nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3
nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3

What's Next?
  View summary of image vulnerabilities and recommendations → docker scout quickview nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3
misha_beliy@MacBook-Pro-Misha RnD_Jetson_optimization % docker build -t jetson-build -f Jetson.Dockerfile .     
ERROR: open /Users/misha_beliy/.docker/buildx/activity/desktop-linux: permission denied
misha_beliy@MacBook-Pro-Misha RnD_Jetson_optimization % sudo docker build -t jetson-build -f Jetson.Dockerfile .
[+] Building 1.2s (2/3)                                                                                                                                docker:desktop-linux
[+] Building 1.4s (3/3) FINISHED                                                                                                                       docker:desktop-linux
 => [internal] load .dockerignore                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                        0.0s
 => [internal] load build definition from Jetson.Dockerfile                                                                                                            0.0s
 => => transferring dockerfile: 1.24kB                                                                                                                                 0.0s
 => ERROR [internal] load metadata for nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3                                                                                   1.3s
------
 > [internal] load metadata for nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3:
------
Jetson.Dockerfile:1
--------------------
   1 | >>> FROM nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3 as base
   2 |     
   3 |     RUN apt-get update && apt-get upgrade -yy && apt-get install -yy \
--------------------
ERROR: failed to solve: nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3: error getting credentials - err: exit status 1, out: ``

When I run legacy build it works great. But this is strange
DOCKER_BUILDKIT=0 docker build