"I have an Nvidia Jetson AGX Orin, and I am looking for a PyTorch image with Python 3.9 and CUDA 11.8. However, it seems that NGC only has an L4T image with Python 3.8 and CUDA 11.4. I tried following the steps in this guide to build my own image, but I encountered an error: KeyError: "couldn't find package: pytorch".
If these suggestions don’t help and you want to report an issue to us, please attach the model, command/step, and the customized app (if any) with us to reproduce locally.
Hi @carolyuu
I am currently using the nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3 image to launch a container, and I’ve noticed that it includes CUDA 11.4 and Python 3.8. I would like to use CUDA 11.8 and Python 3.9, as I plan to run the AWQ-based LLM model (hugging-quants--Meta-Llama-3.1-8B-Instruct-AWQ-INT4) in this environment. Since I haven’t found a suitable image, I’m considering building one myself. However, as I mentioned previously, I encountered a KeyError: "couldn't find package: pytorch" error during the build process. I’m not sure which step may be causing this issue, or if you might recommend a better approach than building it myself?"
How do you build PyTorch? Do you build it in the Dokcerfile?
Based on your use case, is Python3.10 an option for you?
If yes, please upgrade to JetPack 6.0 or 6.1 and there are some containers with the PyTorch pre-installed.
Hi @AastaLLL
I followed the steps from jetson-containers/docs/build.md at master · dusty-nv/jetson-containers · GitHub to build the image, using the command CUDA_VERSION=11.8 PYTHON_VERSION=3.9 PYTORCH_VERSION=2.3 jetson-containers build --name=l4t-python39 pytorch. Based on my understanding, jetson-containers should construct an image of the specified version according to the base image and the given CUDA_VERSION, PYTHON_VERSION, and PYTORCH_VERSION. However, I encountered an error.
As you suggested, I noticed that JetPack 6.0 indeed includes Python 3.10, but it uses CUDA version 12.x. My use case has not been tested with CUDA 12.x, so I’d like to build an image with the specific versions I need.
I recently discovered an image, dustynv/text-generation-webui:r35.4.1-cp310, and by upgrading PyTorch, I was able to resolve the issues I was facing. However, it is not a perfect solution. My original plan was to use the AWQ quantized model, but unfortunately, autoAWQ is not supported on JetPack 5.1.2. As a result, I temporarily opted for a different quantized model as a substitute.
If I want to use autoAWQ, transformers, and PyTorch 2.2 together, what commands should I use to build the container?
Alternatively, if I use transformers:r35.4.1 as the base image and want to add autoAWQ and PyTorch 2.2, what are the proper commands to do so?
So far, I haven’t been able to successfully create my own image using the instructions in the build documentation above. I’m a bit confused and wondering if I might have misunderstood something.
Hi @AastaLLL
Thank you for providing the information. I noticed that it only includes the PyTorch version. Would it be possible to share more detailed information, such as the versions of other packages like Python or torchvision? The Python version can affect whether certain packages can function properly.