Hi, I’m trying to figure out how to setup IJulia for all users on my JupyterHub server.
I know that Julia has “depots” in global locations, but I’m not sure how to install packages there. When I run Pkg.depots(), I see this:
I’ve been trying some more stuff. With the command above, it looked like sudo was interfering with the Base.DEPOT_PATH variable getting set. What worked was this command:
$ sudo env JULIA_DEPOT_PATH=/opt/julia-1.4.2/share/julia julia
This allowed me to install IJulia to the global depot. However, after that I had to run:
Note though that I’m not sure this is the “best” or even a “good” solution. But it seems to work from the little testing I did so far. One issue I’m not clear about is how it will interact with updating, in particular IJulia.
Thanks for your post, @camtheman256, which works for Julia 1.8.1 and Jupyterhub 2.02 hosted by an LXC container that is Ubuntu-20.04-based. A little update here.
I installed Julia to /opt/ for the ease of global availability.
sudo tar -xzf julia-1.8.1-linux-x86_64.tar.gz -C /opt/
vim /etc/bash.bashrc
# The global Julia settings to work with Jupyterhub
export JULIA_HOME="/opt/julia-1.8.1"
export JULIA_PKG_SERVER="https://mirrors.bfsu.edu.cn/julia"
export JULIA_DEPOT_PATH="$JULIA_HOME/share/julia"
export PATH="$JULIA_HOME/bin:$PATH"
Note: Here’s a Julia Pkg Server list in Chinese. If you’re not sure which one to choose, just use the official one: https://pkg.julialang.org.
Log out and log in to make the changes applied. Install IJulia.