cocalc : how to add a julia kernel?

Viewed 394

I have installed cocalc image on google cloud (https://github.com/sagemathinc/cocalc-docker/blob/master/Dockerfile) I have tried to add julia 1.4 kernel to jupyter but it failed. I have set .julia to be here : /usr/local/share/.julia.

Config

julia bin directory : /opt/julia/bin/julia

ln -s /opt/julia/bin/julia /usr/local/bin

IJulia is installed

using Pkg ;
Pkg.add("IJulia");

etc/julia/startup.jl

ENV["JULIA_DEPOT_PATH"] = "/usr/local/share/.julia" ; 
ENV["JUPYTER"] = "/usr/local/bin/jupyter"; 

/usr/local/share/jupyter/kernels/julia-1.4/kernel.json

{
  "display_name": "Julia 1.4.0",
  "argv": [
    "/opt/julia/bin/julia",
    "-i",
    "--startup-file=yes",
    "--color=yes",
    "--project=@.",
    "/usr/local/share/.julia/packages/IJulia/yLI42/src/kernel.jl",
    "{connection_file}"
  ],
  "language": "julia",
  "env": {},
  "interrupt_mode": "signal"
}

Error I get

sh-4.4$ jupyter console --kernel=julia-1.4
ERROR: LoadError: ArgumentError: Package IJulia not found in current path:
- Run `import Pkg; Pkg.add("IJulia")` to install the IJulia package.

Stacktrace:
[1] require(::Module, ::Symbol) at ./loading.jl:892
[2] include(::Module, ::String) at ./Base.jl:377
[3] exec_options(::Base.JLOptions) at ./client.jl:288
[4] _start() at ./client.jl:484

It seems that I don't understand Julia package management for projects (""--project=@." options in kernel.json).

EDIT according to the julia Pkg Doc, the --project=@. command line tags makes Julia search for *.toml files in parent directories. But even by changing ./julia directory to the project parent directory, it does not work.

0 Answers
Related