We recently decided to make Julia Language available on our cluster systems. The cluster system is not able to connect to the internet. Is there any way to download all Julia packages and make them available for our different users to install and use them offline?
Another option that we have is a system that can connect to the internet temporarily, but it is always connected to the main cluster system. Is there any way to use this system as a mirror for the Julia packages or not?
We want to use “Julia 1.0.1”.
our cluster operation system is: "CentOS 5.5
notes: I have seen the question asked before here, but it is for Julia 0.6 and a single package that will be copied by hand. I want that user uses the
Pkg.add <pkgName> command but instead of the internet, the package manager gets the packages from our offline system.
Thank you for your help and time.
thanks for the discussion links.
How can I get latest Julia packages for Julia 1.0 so that I can have them available offline?
Nothing short of adding them manually I think. I have thought about something like
pkg> registry instantiate
to “instantiate” a registry, that is, download all the packages in there, similar to how you can instantiate a
Manifest.toml to get all packages in there.
I did this and it seems to work for me but with a problem!
userA I add all the packages. But I don’t
Then I open the Julia in
userB terminal and execute this command to push the
the result is something like this:
Now when I use
add [packageName] the Julia uses the added packages from the
userA ("/home/userA/.julia") path, and when I use
precompile the results files will be stored in
userB directory ("/home/userB/.julia"). By this way, There is no need to copy packages for all users, and each user can have different projects, etc.
But I have a problem. It is necessary to execute
push! command every time a user starts Julia. I tried using
export JULIA_DEPOT_PATH The result is:
and it causes an error when using packages (obviously because the userB has not permission to write in the userA directory).
It is needed to have all for paths in
Is there any way to set these 4 paths for each user without using
push! command when a user starts Julia? I mean for example in bash or even by changing soething in julia source codes?
I found the answer.
There is a file named
startup.jl in the
julia-1.0.2/etc/julia path. anything in this file will be executed before the startup of Julia.
so I puted the
push!() command inside this file and It’s done.