Using Julia in Jupyterhub#
System-based Julia#
We already provide a kernel for Julia based on the module julia/1.7.0.
In order to use it, you only need to install ÌJulia:
module load julia && julia
]
add “IJulia”
[xxxx@levante4 ~]$ module load julia && julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.7.0 (2021-11-30)
_/ |\__'_|_|_|\__'_| |
|__/ |
(@v1.7) pkg> add "IJulia"
Updating registry at `~/.julia/registries/General.toml
User-based Julia#
If you are using your own Julia installation following (correctly) the instructions described here:
wget https://julialang-s3.julialang.org/bin/linux/x64/1.6/julia-1.6.0-linux-x86_64.tar.gz
tar zxvf julia-1.6.0-linux-x86_64.tar.gz
you can use it in Jupyterhub.
How?#
all what you need is to install the ÌJulia
package (official
link):
using Pkg
Pkg.add("IJulia")
Note
Start Julia from the unzipped: julia-1.6.0/bin/julia.
after this, you will see a new kernel in jupyterhub julia-1.6.0
.
Install packages#
it is preferable to activate an environment first:
Pkg.activate("path/to/env")
default env is
.julia
in your $HOME directoryPkg.add("new-package")
Warning
The installed packages version depends sometimes on a specific Julia release. Possible issues are not necessarly related to Mistral or Jupyterhub. Please, check their troubleshootings section first!