How to install CUDA.jl without Julia package manager

Hello all,
It may be a dumb question, but I was not able to find an answer online.
Due to the security reasons and firewalls, I cannot use Julia package manager which makes hard to install CUDA.jl.
Is there anyway to install CUDA.jl manually?

ask your company to host this GitHub - JuliaPackaging/PkgServer.jl

1 Like

I tried, but due to the policy, they cannot do that.
So without package manager, I cannot install CUDA.jl, right?

Well, you could install portable Julia GitHub - PetrKryslUCSD/VSCode_Julia_portable: Portable Julia running in VSCode with all your required packages on an USB stick outside of your company if you are allowed to use USB sticks…

Unfortunately USB is also not allowed, either.

Well, if you are not allowed to install any software you cannot do it…

What IS allowed, then? Is downloading a file from the internet allowed?

1 Like

When you say you can’t use the package manager, do you mean you can’t even locally use the pkg interface by pressing ] at the REPL? What happens when you do? Can you download the packages from their GH repos and then use ]add /local/path to wherever you downloaded it?

I mean I cannot reach GH repositories since the network is blocked.
The below are what I got when I do ] add CUDA and it’s the same for using REPL.

(@v1.6) pkg> add CUDA
Installing known registries into ~/.julia
┌ Error: curl_easy_setopt: 48
└ @ Downloads.Curl /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Downloads/src/Curl/utils.jl:36
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- 0:00:19 --:–:-- 0┌ Warning: could not download
└ @ Pkg.Types /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Types.jl:997
┌ Error: curl_easy_getinfo: 43
└ @ Downloads.Curl /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Downloads/src/Curl/utils.jl:36
┌ Error: curl_easy_setopt: 48
└ @ Downloads.Curl /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Downloads/src/Curl/utils.jl:36
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- 0:00:10 --:–:-- 0^Z

How did you get Julia on this computer in the first place? Do you have access to any cloud storage/file transfer system at all? Maybe download the package from GitHub, .zip it, and stick the file on your company’s cloud storage for later download?

I did. I just downloaded “julia-1.6.7-linux-x86_64.tar.gz” and untar it on the cluster. I can certainly download those packages from GH repository, but is it all? I can just upload the files and unzip them? How to link them to Julia?

This looks like a tricky problem and I hope someone more knowledgeable than me can chime in.

I was going to suggest just grabbing CUDA.jl off GitHub and installing it from a local directory, but this will not work, because CUDA.jl has dependencies that (in all likelihood) you haven’t installed and would need to manually install in the same way.

If you have a way of getting files onto this computer, I think you’d be better off installing Julia and CUDA on an equivalent (in terms of OS, processor architecture etc.) machine, making sure this Julia environment does what you need it do, and then copying your ~/julia-1.7.3/ (Julia installation) and ~/.julia (packages etc.) folder over to the new computer using whatever file transfer method you have. I haven’t tried this myself, but I’m curious if it’s doable, so if I have time I might try this on a VM and report back.

1 Like

Can you explain how to install CUDA.jl from a local directory? If it requires other packages due to dependencies, I can probably do the same thing for those packages. In fact, my original question was how to install CUDA.jl without Julia Package manager. So installing it from a local directory would be the perfect answer for me.

Can you git clone anything? What can you do? Have you tried playing with the JULIA_PKG_SERVER setting?

Otherwise, you will have to manually download the tarballs, starting with the dependencies, untar them, and then add their local paths to Julia.

See adding local packages here:

using Pkg
pkg"add /path/to/local/pkg"

The directory you point to should contain a Project.toml.

It seems I am basically able to do nothing. I can git clone only from company’s repositories.
Thanks for the info. I will give it a try and let you know.

I got this working with Julia 1.6.7 LTS on a Debian 11 virtual machine (chosen because I happened to have the ISO lying around) in VirtualBox using the following steps. You will need to make a few changes to match your environment:

  1. Install Debian 11 to a virtual machine debian with the default settings, no graphical environment.
  2. “Full Clone” the virtual machine to debian-offline and disable its network adapter to simulate the airgapped cluster.
  3. Create a virtual hard disk spare (which represents a USB key or whatever tool you use to move files onto your cluster).
  4. Log into debian, install Julia by curl and extracting the archive to the home directory.
  5. Install CUDA.jl with ]add CUDA, then run using CUDA and perhaps a few tests to ensure that it precompiles etc.
  6. Copy ~/.julia and ~/julia-1.6.7 (or wherever you installed the Julia binary) onto spare, making sure that you include hidden subdirectories.
  7. Log into debian-offline, mount spare, and copy ~/.julia and ~/julia-1.6.7 into the home directory.
  8. Run the Julia binary and verify that you can using CUDA:


Note: I had to run Julia as the max user, which matches the setup from the online computer for this to work.