Installing Julia on Linux server?

Hi! I am moving on to run my Julia codes on a HPCE Linux server. Could someone point me on how exactly to download and install Julia on the server ?
Following this I’m planning to install IJulia so as to be able to connect my jupyter notebooks to the server.

Thanks

1 Like

download julia tarball, untar it, run it

3 Likes

Hi! Platform Specific Instructions for Official Binaries are available here: Platform Specific Instructions for Official Binaries. I guess HPC environments differ significantly and there is little info about it in your post. Anyway, AFAIK usually HPC environments are using Anaconda. Some other software and packages you may consider inculde: VS Code and VS Code Extensions such as Remote - SSH, Julia, Jupter, Python and Pylace and Connect to External REPL function that is available in Julia extension. When I am in need of Python in Julia, what I found very useful in environments with global non writable conda depot is PythonCall package (I was able to configure everything with PyCall as well but I am finding PythonCall configuration to be much more clear). I hope that you find some of those general tips useful. I would like to underline that I am not a HPC guru. I guess that in case you need some comprehensive advice on those topics it might be good to take part in JuliaHPC Mothly Calls [Community]. It should be noted that the camaraderie there is very geeky but the atmosphere is ultra cool and helpful. :slight_smile:

1 Like

@johnh is one of the resident experts on this topic I believe.

For what it’s worth, my HPC uses https://easybuild.io/ for software modules.

1 Like

I was able to download the tar file for installation through ssh , however everytime i try to unpack it is getting stuck at some point. What could be the issue ?

I was able to download the tar file for installation through ssh …

Aha, :-), what is your system specification, particularly OS release <cat /etc/os-release> and CPU model <lscpu> and available disk space <df -h> if I may ask? What is happening after you execute such a command (which should install Julia for you):

JULIA_VERSION=1.7.1 bash -u -ci "$(curl -fsSL https://raw.githubusercontent.com/abelsiqueira/jill/master/jill.sh)"

(In case you do not have curl available on this machine, if on Debian distros install it with <sudo apt install curl> and in case of Fedora based distros with <sudo yum install curl>.

The server system is ~

[ph20c032@aqua ~]$ cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.6 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.6"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.6 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.6:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.6
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.6"
---------------------------------------------------------------------------------------------------
[ph20c032@aqua ~]$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                80
On-line CPU(s) list:   0-79
Thread(s) per core:    2
Core(s) per socket:    20
Socket(s):             2
NUMA node(s):          2
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 85
Model name:            Intel(R) Xeon(R) Gold 6248 CPU @ 2.50GHz
Stepping:              7
CPU MHz:               1879.425
CPU max MHz:           3900.0000
CPU min MHz:           1000.0000
BogoMIPS:              5000.00
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              1024K
L3 cache:              28160K
NUMA node0 CPU(s):     0-19,40-59
NUMA node1 CPU(s):     20-39,60-79
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_ppin intel_pt ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp hwp_act_window hwp_pkg_req pku ospke avx512_vnni spec_ctrl intel_stibp flush_l1d arch_capabilities 

When installation command in run (** as you have mentioned) then

ULIA_VERSION=1.7.1 bash -u -ci "$(curl -fsSL https://raw.githubusercontent.com/abelsiqueira/jill/master/jill.sh)"
bash: PROMPT_COMMAND: unbound variable
bash: COLORTERM: unbound variable
bash: local256: unbound variable
bash: ABRT_DEBUG_LOG: unbound variable
bash: ABRT_DEBUG_LOG: unbound variable
JILL - Julia Installer 4 Linux - Light
Copyright (C) 2017-2021 Abel Soares Siqueira <abel.s.siqueira@gmail.com>
Distributed under terms of the GPLv3 license.

This script will:

  - Try to download julia version '1.7.1'
  - Create a link for julia
  - Create a link for julia-VER

bash: Download folder: ${JULIA_DOWNLOAD@Q}: bad substitution
bash: BASH_COMPLETION_COMPAT_DIR: unbound variable
bash: TOP_SUBOPTIONS1: unbound variable
bash: GLUSTER_RESET_OPTIONS: unbound variable
bash: GLUSTER_VOLUME_OPTIONS: unbound variable
bash: USER_LS_COLORS: unbound variable
bash: QT_GRAPHICSSYSTEM: unbound variable
bash: KSH_VERSION: unbound variable
bash: ZSH_VERSION: unbound variable
JILL - Julia Installer 4 Linux - Light
Copyright (C) 2017-2021 Abel Soares Siqueira <abel.s.siqueira@gmail.com>
Distributed under terms of the GPLv3 license.

This script will:

  - Try to download julia version '1.7.1'
  - Create a link for julia
  - Create a link for julia-VER

bash: Download folder: ${JULIA_DOWNLOAD@Q}: bad substitution
Do you accept these terms? (Y/N) Y
Downloading Julia version 1.7.1

appears, however, the download is very slow as it keeps the same message on the screen for about a long as thirty minutes.
I have no idea what to do next!

Yeah. Unfortunately, its hard for me to provide any additional / precise advice. Being in your place and based on provided info what I would be looking at is a) what’s the shell you are using and if everything is ok with it and b) if everything is ok with Gluster filesystem. You may also try to install Julia with Python jill. Please see my post here how I did it on on ARM. The steps are the same on x86: Julia v1.7.1 on RPI4: Use JILL - #5 by j_u

The commands are:

$ sudo yum install python3-pip
$ sudo pip3 install jill
$ jill install

Due to “WARNING: Running pip install with root privileges is generally not a good idea. Try pip3 install --user instead.” you may follow this WARNING advice and not use sudo for this step.

1 Like

FWIW, there’s also juliaup for Linux

curl -fsSL https://install.julialang.org | sh
3 Likes
#!/bin/bash
#
# Automated install, unzip, and link Julia 1.7.2
#
# The present script downloads Julia, decompress
# and unzip it into $HOME/sw. Then it removes the
# downloaded archive and adds a symbolic link to
# julia binary executable.
#
#

# Let's create two folders: "bin" (binaries) and "sw" (software) in $HOME
mkdir -pv $HOME/bin
mkdir -pv $HOME/sw
mkdir -pv $HOME/.julia/config


# Now let's download and unpack Julia
wget --no-check-certificate -O julia.tar.gz https://julialang-s3.julialang.org/bin/linux/x64/1.7/julia-1.7.2-linux-x86_64.tar.gz
gzip -d julia.tar.gz
tar -xf julia.tar

# Let's clean up, removing the downloaded archive, as it is no longer needed
rm -f julia.tar

mv julia-1.7.2 $HOME/sw/

# Let's finally create a symbolic link, so that julia's binary can be easy found
rm -f $HOME/bin/julia
ln -s $HOME/sw/julia-1.7.2/bin/julia $HOME/bin/julia

# Add the path to .bashrc
echo "export PATH=$HOME/bin:$PATH" >> ~/.bashrc

# Add the path to the current session
export PATH=$HOME/bin:$PATH

echo 'ENV["PYTHON"] = "'$HOME'/sw/miniconda3/bin/python3"' >> ~/.julia/config/startup.jl
echo 'println("Setup successful")' >> ~/.julia/config/startup.jl
5 Likes

Thanks very much man! You realy got me going thanks very much!!!

Instead of two lines (gzip+tar) one tar is enough (and so you don’t need rm julia.tar)

tar xzf julia.tar.gz

Sometimes - personal opinion - it is much better to have 5 lines of code (or bash script), where each is crystal clear for a newbie. The age of slow 386 of 68000 is gone. :wink:

you missed a -