How to distribute standalone Julia applications to non-programmers?

I’d like to distribute standalone applications written in Julia to users who don’t program in Julia, and I want the installation process to be as easy as possible. The user may be using a remote cluster with an outdated version of Julia that I don’t want to use. So I’d like to provide a single script, which installs an up-to-date version of Julia in a local installation directory, configured to use a package depot confined in the local installation directory (rather than $HOME/.julia which may conflict with other usage of system-wide installed Julia), and bundles my Julia scripts (either as files or accessed from a local git repository on a cluster). Ideally I’d like the procedure to work across Linux, Windows, and MacOS.

Is there a good way to do what I described above?

Are those other users also researchers or students?

I am/was in a similar situation, see Best practices to share simulations with collaborators?
In my experience, it is less error-prone to ask someone to install Julia in the traditional way compared to running a special script XY.

I use these steps on Windows:

  • Tell the user install Julia and click on add to PATH during the installation.
  • Provide simple bat scripts to execute the scripts.
  • I use PackageCompiler to speed up everything, so, there is one bat script to generate an image.
    (There are also juliaup and juliawin which aim at simplifying the installation on Windows.)

On a Linux cluster, the user might be experienced enough to install a Julia distribution in the home directory? The collision of the depot directory should usually be handled by Julia itself, you can install several Julia versions on the same computer.

I have no experience with MacOS.

It sounds to me like you want to create an app using PackageCompiler.jl?

Another option might be to use some sort of container.
I’m using Singularity containers to share my Julia install and programs. Other containers might work for you as well depending on your requirements.

2 Likes