I’m aware that similar questions have been asked in the past, but I did not find the answer I was looking for.
I need to install all of the JetPack packages onto a TX2 without internet access. As per linuxdev’s recommendations in another thread, I first connect my host to the internet, let JetPack download all of the packages, and then wait until host has all packages installed. Then before I give the IP address and user/pass info to JetPack to ssh in (as I am not flashing the device, I can use ssh instead of network/switch setup), I unplug my ethernet cable from my router and connect directly to TX2.
I can use the jetson to ping the host and vice-versa, so network setup appears to be fine. Problem is that when JetPack tries to install cuda-repo-l4t-9-0-252-1_arm64.deb, it fails when trying to resolve ports.ubuntu.com - Of course, this would make sense if it is trying to access something whilst having no internet access. So: Is it possible to install these packages completely offline as long as JetPack has already downloaded them? Does anyone have any insight into how to do this properly? I have also tried the manual dpkg method from Jetson side, but this fails due to other dependencies - which would be easy to fix if I could use sudo apt-get … but I have no internet access. So - any ideas?
(edit) I might add that after the temporary failure resolving ‘ports.ubuntu.com’, the Xterm output says that connection to <jetson_ssh_IP_address> closed. Then a bunch of dpkg-queries come up saying for example package ‘cuda-toolkit-9-0’ is not installed and no information is available. It then follows for a couple of other packages. I will attempt to upload the screenshot of terminal output
Thanks for your time
On your PC JetPack needs to run successfully once. I’m not sure exactly how far in it must have succeeded, but within your JetPack install directory on the PC there should be a “jetpack_download/” directory. Within this do you have this or some other version (this version is from JetPack3.2):
If so, copy it to the Jetson and run:
sudo dpkg -i ./cuda-repo-l4t-9-0-local_9.0.252-1_arm64.deb
You might also find this post useful:
Thanks for responding so quickly, linuxdev.
I attached a .png in my original post showing the XTerm output when using the JetPack ssh to install pacakges.
I have already tried installing the packages manually using dpkg like you suggest. As far as I remember, the output from terminal seemed to think installation was fine, i.e cuda was installed according to output, however I checked /usr/local for the cuda directory but it is not there so I assume something went wrong. Also tried ./nvcc and it is unrecognised.
Tomorrow I will try to install the packages with dpkg and pipe the output so you have more useful information. AFAIK cuda apparently installed okay but there were other missing dependencies and like I said, nothing in /usr/local. Unfortunately I won’t be able to get you that terminal output for half a day as I am probably on the other side of the globe and it is nighttime here.
I assumed the cuda repo that JetPack uses just contains metadata or something and that further packages were required for downloading.
So it is possible to install everything with dpkg after JetPack downloads the repos?
Also, thank you for that link, I will try that workaround tomorrow and report back
FYI, within the TX2 the files located at “/var/cuda-repo-*” are a local repository. The repository is installed if this exists, but not necessarily any of the packages within this. Even so, you might query to see which packages are installed. I’m going to put a list here which uses package names but not versions and the grep command to check what is actually in place:
dpkg -l | egrep '(cuda-command-line-tools-|cuda-curand-dev-|cuda-libraries-dev-|cuda-nvrtc-|cuda-core-|cuda-cusolver-|cuda-license-|cuda-nvrtc-dev-|cuda-cublas-|cuda-cusolver-dev-|cuda-minimal-build-|cuda-runtime-cuda-cublas-dev-|cuda-cusparse-|cuda-misc-headers-|cuda-samples-|cuda-cudart-|cuda-cusparse-dev-|cuda-npp-|cuda-toolkit-|cuda-cudart-dev-|cuda-documentation-|cuda-npp-dev-cuda-cufft-|cuda-driver-dev-|cuda-nvgraph-cuda-cufft-dev-|cuda-gdb-src-|cuda-nvgraph-dev-)'
Simply copy and paste this line in the Jetson to see which of those packages are already installed. If installed, try manually removing them (use “sudo dpgk --remove package1 package2 package3…”, where “package#” is just one of the packages as listed in the the “dpkg -l” output). Do not remove any “cuda-repo” package, this is the set of available packages and not an actual package. Then try again.
This does seem possibly related to the other URL I listed:
…double check to see if this is related.
Also, I have known the automatic apt update on GUI login to run for some time after a new install and to cause a second update to not be possible until the first finishes. Should something go wrong it might leave a stale lock in place and never open back up.
FYI, if you install packages with dpkg, then it is up to you to get the install order correctly. JetPack should already do this correctly, but other issues get in the way. Whenever you use dpkg to install or uninstall you can name all relevant files in a single dpkg line and it should work (e.g., dpkg will know if one of the named packages must go in before the other, but won’t find an order for a package not mentioned in the command line…“apt-get” will resolve order and you can use “apt” or “apt-get” with any of the files in the local repo…this is part of why it is called a repo and not just a set of files).
I managed to get my restrictions regarding internet access to the TX2 lifted for the purposes of installing the packages. I connected host and Jetson through a switch and gave it internet access, and repeated the JetPack SSH install process. This time it worked, however I noticed that the Xterm log was showing that MANY files were being downloaded and updated etc. as the install process was happening. I think it is possible that the dependencies were missing from the host which broke things, allowing internet access to host while it was installing on the Jetson allowed it to fix any dependencies as it went along. I’ve confirmed that nvcc etc. is working now on the Jetson - thank you for the suggestions and responding promptly.
You are probably correct. JetPack downloads its manifest and files each time it runs (which implies updates). Just be sure to not delete intermediate files (which includes “jetpack_download/”). Then you’ll have them available in that version at a later date. You might even consider copying those somewhere else just to know they are around later even if no network is available.
Thanks linuxdev for the extra info. I will close the thread now. I’ll accept your most recent comment as answer so that the thread doesn’t hang indefinitely.