Latest Julia binaries: A static URL

Hi all,

I prefer to setup my Linux system as automatically as possible using a setup script.
Currently, I’m downloading the latest Julia binary manually since with each version the URL changes.
For example:
https://julialang-s3.julialang.org/bin/linux/x64/1.6/julia-1.6.2-linux-x86_64.tar.gz

Is there a URL that always points to the latest binary of a specific architecture?
Something like:
https://julialang-s3.julialang.org/bin/linux/x64/latest/

If not, is it planned?
Does a workaround exist?
How do you get the latest binary?

2 Likes

looks like you want to parse this https://julialang-s3.julialang.org/bin/versions.json

something like this:

julia> using JSON3

julia> j = JSON3.read(read(download("https://julialang-s3.julialang.org/bin/versions.json"), String));

julia> maximum(VersionNumber.(String.(keys(j))))
v"1.7.0-beta3"

julia> j[Symbol(maxver)][:files]
4 Likes

Minor improvement on @jling suggestion in case you want the latest stable version:

julia> using JSON3, Downloads

julia> j = JSON3.read(String(take!(Downloads.download("https://julialang-s3.julialang.org/bin/versions.json", IOBuffer()))));

julia> maxver = maximum(v for v in VersionNumber.(String.(keys(j))) if v.prerelease == ())
v"1.6.2"
2 Likes

Hello @fedario Are you using Ansible rules or something similar to set up these systems?
I would urge everyone to look at HPC package managers:

Easybuild
https://docs.easybuild.io/en/latest/version-specific/Supported_software.html#list-software-letter-j

And Spack
https://spack.readthedocs.io/en/latest/package_list.html#julia

2 Likes

I think that using Julia to in order to install Julia as part of a setup script is probably disallowed :wink:

I’d recommend using jill install --confirm from jill.py

4 Likes

Or NixOS.

1 Like

Thank you all for your great ideas!
I really wish there was a URL that points to the latest version, provided by the core team. Or maybe even something like rustup, but that is probably to much work in the current stage.
Is something like that feasible? @StefanKarpinski

That is true. :smile:

No, it is a simple bash script to setup my personal desktop environment.

it’s useless without the architecture etc. parts, so you ends up parsing anyway, so what’s the point if the parsing is 3 lines or 5 lines

1 Like

I don’t understand your point.
If I download the latest julia version from a generic url, extract it and set it up to be in my PATH, why do I need to parse anything?

which one do you expect the link to point to?

In the OP I described a possible way to specify that:
https://julialang-s3.julialang.org/bin/linux/x64/latest/

1 Like

it’s at least x86_64 because ARM64 and PowerPC64, and then you have musl or gcc.

My point is it’s not gonna be portable if you hard-code architecture and operation system. Based on this, if you need to “handle” it somehow, it’s basically not much more or less complex than what we have now – a simple JSON that has everything

1 Like

That is true.
However, my intention is much simpler: Have a simple setup script that installs and configures all I need when installing a fresh Linux on my desktop system.

That being said, I definitely agree that a portable and easy solution would be even better.
Rust does this very well, just run:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
(Getting started - Rust Programming Language)

ok, so the true request is someone should write a sh script for Julia, and I’m all for it although I use package manager if I’m already on Linux, in my case:

paru julia-bin
1 Like

No, I do not request anything like that, but it would be great if it did exist. A “latest” link would be the second best but much simpler solution which is why my original question focused on that.

That is definitely a way to do it. I don’t use Arch, however.

2 Likes

@johnh @rikh I’ve had good experiences with the Nix package manager (even without full NixOS) on CentOS-based HPC cluster machines, even without root by using PRoot and even on NFS by following the NFS instructions and use-sqlite-wal = false.

2 Likes