Installing CUDA on Jetson TX2

Hello, I’m attempting to get CUDA up and running on the Jetson TX2 (using a Dockerfile, starting from either Debian or Ubuntu) and i’m kinda at a loss at this point. Usually you would install CUDA and all other libraries through JetPack :

And involves building the image on a different host etc.

Here’s a guide on how to install CUDA on Linux:

I’m not an embedded systems engineer soooooo i’m struggling a bit. Is the solution to make a debian or ubuntu package that’s accessible through apt-get? Does the Resin.os have the right graphics drivers?

Sorry for the newby questions, i’m definitely out of my league here.

1 Like

@dborgesr can you show what errors or problems are you getting when trying this?

So i’m a bit at a loss, I think I need CUDA compiled for aarch64, the issue is that the developer page for CUDA toolkit does not have it compiled for that architecture, BUT, it definitely does exist because the CUDA package for jetson tx2 is built during the JetPack install. The more I dig into this, the more I think this belongs on the NVIDIA forums.

Or it might involve some reverse engineering of

I found this:
Which might be of use, i’m not sure if the right way to approach this is starting from a clean ubuntu image in docker and adding those drivers?

@dborgesr, I think jetpack is aimed at x86 platforms like your development PC and provides all the toolchains etc, what we need to figure out is what kind of runtime dependencies you need on the TX2 to do the type of GPU stuff you want to achieve. I know one of our engineers @telphan was looking at making a machine vision demo on the TX2, not sure if he got around to it yet?

Hello @dborgesr, resin does not provide the necessary drivers for the Nvidia chipset. But you should be able to cram into a docker image all the drivers you need followingthese instructions with these downloads. The general idea is that you need the toolchain from Nvidia and then compile the CUDA drivers. I could provide you with more help, but I never got to finish my demo project, so I do not have a finalized set of instructions.

1 Like

@telphan did you end up finishing your demo project? Anything you can share to get us going? The CUDA drivers for the Jetson TX2 aren’t available for download from the NVIDIA site anymore.

They are still there, but they are hidden away. We are not sure if we can disclose this information, but we are trying to go around this issue and hopefully will be able to provide you with an example as soon as possible.

Thanks @telphan I found a link to them, after running jetpack, there is a repository.json file with urls to the drivers.

@telphan I am thinking about purchasing a TX2, but I would only do that if it is possible to access CUDA with a resin OS.

Are you saying that your base image for TX2 does not currently have the NVIDIA toolkit installed? Ideally the resin OS image would support the NVidia-docker AND NVidia-docker2, then your base image for the TX2 would already have the NVIDIA toolkit installed. Is this the plan?

@jcramer FYI, I’ve successfully installed CUDA inside the container and the drivers for GPU support.

Yes the base image does not provide the NVIDIA toolkit, this has to be installed on top of the base image.
Unfortunately nvidia-docker does not support the tegra line. I have a solution and will post a example for the Jetson TX2 very soon. I will keep this thread posted.

Awesome!!! I look forward to playing around with this, I kind of let this sit by the side because its out of my expertise range, i look forward to hacking with this.

@telphan did you end up finishing your example?

I managed to run tensorflow and leverage the GPU but struggling to get the built-in camera to work, tried with the v4l2 driver and gstreamer but no luck.

@brice I did finish my example, but it does not make use of the camera per se. I will have a look at the camera and come back to you.

Thanks, too early to share your current example?

Did anyone posted any example or project? I want to be able to get guidelines on having CUDA and compiling tensorflow on Jetson.

I’m eagerly awaiting as well, last I checked it seemed like an insanely involved activity, but I saw some scripts floating around for CUDA in a Docker.

@davidnet @dborgesr If you install Jetpack, you’ll see a repository.json file with links to the library you are looking for, just a matter of pulling the packages and installing them (ie: cuda-toolkit-8.0 and libcudnn6).

1 Like

Install jetpack on a linux box right? not on the Jetson, i realize this might be a dumb question