Offline package installation

Julia packages live on Github, and unregistered packages can be installed usign a git clone.
I guess it is easy enough to make a local copy of a repo on disk. How would one tell julia to install packages from that source, rather than Github?

The answer probably is in the documentation and is glaringly obvious.

Why not just set it up locally and copy over your .julia folder?

Chris - you mean prepare a copy at your home location, then bring the .julia folder to site.
OK, that would work.
I guess this is a use case for JuliaPro. You install JuliaPro and say “well - that is a certified and supported version - it should have everythign you need”

I like Julia very much and would like to promote its use in education.
In fact, I used it as the reference language in a book I wrote about Stochastic Processes.
I would like to propose Julia to be added on the list of accepted languages for the “agregation de mathĂ©matiques” in France (a national competition to hire math teachers as civil servants).
Of course, applicants must work with the same environment, with the good packages already installed.
Copying the .julia directory is just a dirty hack, not a real solution for the deployment.
Even if we forget the context of a national contest, the problem is the same for the deployment of Julia in a teaching department.

Of course, Julia Pro could sound like a solution, but

  • the licence prevents from copying the Personal version
  • the Enterprise version is too expensive

This is really a strong issue which prevents me to go further in the promotion of Julia.

I am not sure why you replied in this topic — is offline installation (not use, which I would understand) a requirement for these national competitions? In any case, for a perfectly reproducible environment, you can pin the exact versions in the REQUIRE file, or just use a Docker image. The latter should be trivial for any system administrator nowadays. It also allows would-be contestants to download the precise test environment and learn to work in it.

Deployment should be the easiest problem to deal with when promoting Julia, especially in an institutional setting.

The competitions use a special bootable key, so yes, offline installation is mandatory.
The guy which organizes it is not employed as a system administrator, he is a teacher whose work in this task is mainly pro bono.
So, basically, if I can tell him just apt-get install julia julia-packages, the answer will probably be yes, but I can not ask him to plunge into the details of a software he has probably never used.

This post seems also related to these problems

Perhaps I have to wait Pkg3

I am confused about the requirements, eg

but

so I am not sure what needs to be offline and online.

Perhaps the person organizing this could ask questions here with the exact requirements and get more specific help.

Many people do a lot of work without compensation in the free software world, so this situation is not uncommon. Nevertheless, if specific tools are needed, someone has to step up and invest the work. This looks like a problem that is solvable with some time investment, so maybe you could help him out? Basic Docker stuff can be learned in an afternoon, I did that for a unit testing setup for a package.

I was really happy with how easy it was to install Julia on linux even though I have little Linux experience. Basically, just extract the zip file and I am done.

I got Julia v1 running Redhat Linux. How do I find out where .julia folder is? I understand I can just put the code there and it will recognise it.

And if I want to change it how do I do that? If I understand correctly here says that ENV["JULIA_HOME_DEPOT"]="/some/path" should suffice.

The .julia folder is a “depot”. You can see/set the stack of depots with DEPOT_PATH. The default depot is usually at /home/SomeUser/.julia.

I’m not sure what you mean by this. Are you trying to do something special?

No. I just want to copy the files from a package and put them into .julila, so then using PkgName should work right?

You have to set your environment too. Its not really recommended to set those files manually unless you are forced to e.g. in an an offline environment.

Also, it would be better if you didn’t necropost across multiple Pkg threads. It just makes them more noisy for future Julia users who also need help.

I don’t agree with you at all. After reading this post I still couldn’t figure out how to do it. So posting and adding more info actually helps others who are in the same situation as me.

My posts were asking different things, and that’s why they were different postings to start with.

I personally find this link to Erik’s blog post very useful for working with off line packages: https://medium.com/@Jernfrost/my-new-workflow-with-julia-1-0-99711103d97c

1 Like

@alea I suspect from what is said here that this system does have a connection to the internet, but it uses a proxy. We can help you set up the environment variables for the git program which allow you to download packages using the proxy.
Please ask your systems guy if there is a proxy.

Also I would advise that your systems guy creates an account called something like ‘software’- then you can install Julia as the ‘software’ user and create a JULIA_PKG directory which the software user can write to.

1 Like

let say, you are a teacher and there are many students in your class and you have already many packages installed and you don’t want that your students waste the school internet on re-downloading the packages.

Basically, you still need a git repository, but you can install it locally. See here.