# How to install CUDA.jl without Julia package manager

**URL:** <https://discourse.julialang.org/t/how-to-install-cuda-jl-without-julia-package-manager/85514>\
**Category:** General Usage\
**Tags:** cudajl\
**Created:** [August 9, 2022, 2:29am UTC](https://discourse.julialang.org/t/how-to-install-cuda-jl-without-julia-package-manager/85514 "2022-08-09T02:29:49Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pilbum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pilbum/32/38656_2.png) [@Pilbum](https://discourse.julialang.org/u/Pilbum)\
**Post date:** [August 9, 2022, 2:29am UTC](https://discourse.julialang.org/t/how-to-install-cuda-jl-without-julia-package-manager/85514/1 "2022-08-09T02:29:49Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [August 9, 2022, 3:07am UTC](https://discourse.julialang.org/t/how-to-install-cuda-jl-without-julia-package-manager/85514/2 "2022-08-09T03:07:09Z")

</div>

ask your company to host this [GitHub - JuliaPackaging/PkgServer.jl](https://github.com/JuliaPackaging/PkgServer.jl)

---

<div class="post-metadata">

**Author:** ![Pilbum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pilbum/32/38656_2.png) [@Pilbum](https://discourse.julialang.org/u/Pilbum)\
**Post date:** [August 9, 2022, 4:23am UTC](https://discourse.julialang.org/t/how-to-install-cuda-jl-without-julia-package-manager/85514/3 "2022-08-09T04:23:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [August 9, 2022, 4:31am UTC](https://discourse.julialang.org/t/how-to-install-cuda-jl-without-julia-package-manager/85514/4 "2022-08-09T04:31:08Z")

</div>

Well, you could install portable Julia [GitHub - PetrKryslUCSD/VSCode\_Julia\_portable: Portable Julia running in VSCode](https://github.com/PetrKryslUCSD/VSCode_Julia_portable) with all your required packages on an USB stick outside of your company if you are allowed to use USB sticks…

---

<div class="post-metadata">

**Author:** ![Pilbum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pilbum/32/38656_2.png) [@Pilbum](https://discourse.julialang.org/u/Pilbum)\
**Post date:** [August 9, 2022, 6:54am UTC](https://discourse.julialang.org/t/how-to-install-cuda-jl-without-julia-package-manager/85514/5 "2022-08-09T06:54:56Z")

</div>

Unfortunately USB is also not allowed, either.

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [August 9, 2022, 7:36am UTC](https://discourse.julialang.org/t/how-to-install-cuda-jl-without-julia-package-manager/85514/6 "2022-08-09T07:36:28Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![maxkapur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maxkapur/32/21208_2.png) [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Post date:** [August 9, 2022, 8:51am UTC](https://discourse.julialang.org/t/how-to-install-cuda-jl-without-julia-package-manager/85514/7 "2022-08-09T08:51:13Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Pilbum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pilbum/32/38656_2.png) [@Pilbum](https://discourse.julialang.org/u/Pilbum)\
**Post date:** [August 9, 2022, 9:19am UTC](https://discourse.julialang.org/t/how-to-install-cuda-jl-without-julia-package-manager/85514/8 "2022-08-09T09:19:54Z")

</div>

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 [https://pkg.julialang.org/registries](https://pkg.julialang.org/registries)  
└ @ 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

---

<div class="post-metadata">

**Author:** ![maxkapur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maxkapur/32/21208_2.png) [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Post date:** [August 9, 2022, 9:26am UTC](https://discourse.julialang.org/t/how-to-install-cuda-jl-without-julia-package-manager/85514/9 "2022-08-09T09:26:22Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Pilbum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pilbum/32/38656_2.png) [@Pilbum](https://discourse.julialang.org/u/Pilbum)\
**Post date:** [August 9, 2022, 9:34am UTC](https://discourse.julialang.org/t/how-to-install-cuda-jl-without-julia-package-manager/85514/10 "2022-08-09T09:34:01Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![maxkapur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maxkapur/32/21208_2.png) [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Post date:** [August 9, 2022, 9:53am UTC](https://discourse.julialang.org/t/how-to-install-cuda-jl-without-julia-package-manager/85514/11 "2022-08-09T09:53:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Pilbum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pilbum/32/38656_2.png) [@Pilbum](https://discourse.julialang.org/u/Pilbum)\
**Post date:** [August 9, 2022, 2:34pm UTC](https://discourse.julialang.org/t/how-to-install-cuda-jl-without-julia-package-manager/85514/12 "2022-08-09T14:34:07Z")

</div>

> [@maxkapur](#):
>
> I was going to suggest just grabbing CUDA.jl off GitHub and installing it from a local directory

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.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [August 9, 2022, 3:03pm UTC](https://discourse.julialang.org/t/how-to-install-cuda-jl-without-julia-package-manager/85514/13 "2022-08-09T15:03:45Z")

</div>

Can you git clone anything? What can you do? Have you tried playing with the [`JULIA_PKG_SERVER`](https://pkgdocs.julialang.org/v1/managing-packages/#Pkg-client/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:  
[https://pkgdocs.julialang.org/v1/managing-packages/#Adding-a-local-package](https://pkgdocs.julialang.org/v1/managing-packages/#Adding-a-local-package)

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

```

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

---

<div class="post-metadata">

**Author:** ![Pilbum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pilbum/32/38656_2.png) [@Pilbum](https://discourse.julialang.org/u/Pilbum)\
**Post date:** [August 9, 2022, 9:57pm UTC](https://discourse.julialang.org/t/how-to-install-cuda-jl-without-julia-package-manager/85514/14 "2022-08-09T21:57:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![maxkapur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maxkapur/32/21208_2.png) [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Post date:** [August 10, 2022, 3:28am UTC](https://discourse.julialang.org/t/how-to-install-cuda-jl-without-julia-package-manager/85514/15 "2022-08-10T03:28:29Z")

</div>

> [@maxkapur](#):
>
> 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 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`:

![image](https://global.discourse-cdn.com/julialang/original/3X/f/2/f21db3282afe8ec3ac8e82017d7c15ef24bc4a15.png)

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