Julia kernel on JupyterHub system-wide LDAP

New1nd
Tue, 11 Sep 2018 13:01:19 +0000
General Usage

Hello,

OS : Debian 9.5
Julia : Version 1.0
I’m trying to make Julia kernel work on my JupyterHub. I need the kernel to work for multiple users and not only for the local user / root. I configured JupyterHub with an LDAP authentificator and works fine.
Here is what i’have done at the moment and the error that i’m getting :

[user@serv:~]$ tar xvf julia-1.0.0-linux-x86_64.tar.gz
[user@serv:~]$ sudo mv julia-*/ /opt/
[user@serv:~]$ sudo ln -s /opt/julia-*/bin/julia /usr/local/bin/julia
[user@serv:~]# source activate jupenv
(jupenv) [user@serv:~]# julia
julia> using Pkg
julia> Pkg.add("IJulia")
   Cloning default registries into /root/.julia/registries
   Cloning registry General from "https://github.com/JuliaRegistries/General.git"
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
 Installed Conda ─────────── v1.0.1
 Installed IJulia ────────── v1.11.1
 Installed Compat ────────── v1.1.0
 Installed MbedTLS ───────── v0.6.0
 Installed BinaryProvider ── v0.4.2
 Installed VersionParsing ── v1.1.2
 Installed ZMQ ───────────── v1.0.0
 Installed SoftGlobalScope ─ v1.0.4
 Installed JSON ──────────── v0.19.0
  Updating `~/.julia/environments/v1.0/Project.toml`
  [7073ff75] + IJulia v1.11.1
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [b99e7846] + BinaryProvider v0.4.2
  [34da2185] + Compat v1.1.0
  [8f4d0f93] + Conda v1.0.1
  [7073ff75] + IJulia v1.11.1
  [682c06a0] + JSON v0.19.0
  [739be429] + MbedTLS v0.6.0
  [b85f4697] + SoftGlobalScope v1.0.4
  [81def892] + VersionParsing v1.1.2
  [c2297ded] + ZMQ v1.0.0
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8bb1440f] + DelimitedFiles
  [8ba89e20] + Distributed
  [7b1f6079] + FileWatching
  [b77e0a4c] + InteractiveUtils
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [44cfe95a] + Pkg
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [1a1011a3] + SharedArrays
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  Building Conda ──→ `~/.julia/packages/Conda/m7vem/deps/build.log`
  Building ZMQ ────→ `~/.julia/packages/ZMQ/ABGOx/deps/build.log`
  Building MbedTLS → `~/.julia/packages/MbedTLS/Qo8TN/deps/build.log`
  Building IJulia ─→ `~/.julia/packages/IJulia/k5o7j/deps/build.log`
[user@serv:~]# mkdir /usr/local/share/jupyter/kernels/julia-1.0.0
[user@serv:~]# cp /home/user/.julia/packages/IJulia/k5o7j/src/kernel.jl /usr/local/share/jupyter/kernels/julia-1.0.0/
[user@serv:~]# cp /home/user/.local/share/jupyter/kernels/julia-1.0/kernel.json /usr/local/share/jupyter/kernels/julia-1.0.0/
[user@serv:~]# cp /home/user/.local/share/jupyter/kernels/julia-1.0/logo-32x32.png /usr/local/share/jupyter/kernels/julia-1.0.0/
[user@serv:~]# cp /home/user/.local/share/jupyter/kernels/julia-1.0/logo-64x64.png /usr/local/share/jupyter/kernels/julia-1.0.0/
[user@serv:~]# nano /usr/local/share/jupyter/kernels/julia-1.0.0/kernel.json

{
  "display_name": "Julia 1.0.0",
  "argv": [
    "/opt/julia-1.0.0/bin/julia",
    "-i",
    "--startup-file=yes",
    "--color=yes",
    "/usr/local/share/jupyter/kernels/julia-1.0.0/kernel.jl",
    "{connection_file}"
  ],
  "language": "julia"
}

Error that JupyterHub displays :

ERROR: LoadError: ArgumentError: Package IJulia not found in current path:
- Run `Pkg.add("IJulia")` to install the IJulia package.

Stacktrace:
 [1] require(::Module, ::Symbol) at ./loading.jl:817
 [2] include at ./boot.jl:317 [inlined]
 [3] include_relative(::Module, ::String) at ./loading.jl:1038
 [4] include(::Module, ::String) at ./sysimg.jl:29
 [5] exec_options(::Base.JLOptions) at ./client.jl:229
 [6] _start() at ./client.jl:421
in expression starting at /usr/local/share/jupyter/kernels/julia-1.0.0/kernel.jl:1

I would like to know the right way to make the Julia kernel work on JupyterHub and make it work for all users with out errors or crashs.

Best regards.

7 posts - 3 participants