Skip to content

JuliaCustom

Harald Schilly edited this page May 23, 2017 · 8 revisions

The following are steps how to setup a custom installation of Julia on Cocalc

  1. Get a 64 bit linux tarball: https://julialang.org/downloads/
  2. Extract it, and symlink from your ~/bin/julia to it's bin/julia:
    cd; mkdir bin; cd bin
    ln -s ~/<extracted-tarball-dir>/bin/julia julia
    
  3. Make sure ~/bin is in your PATH, e.g. by appending export PATH=$HOME/bin:$HOME/.local/bin:$PATH to your ~/.bashrc file.
  4. Tell Julia to use a package directory inside your project, add this line to your ~/.bashrc: export JULIA_PKGDIR=$HOME/.julia
  5. Restart the terminal and test you got the correct julia:
    ~$ which julia
    /projects/<your-project-uuid>/bin/julia
    ~$ julia --version
    julia version 0.5.2
    ~$ echo $JULIA_PKGDIR
    /projects/<your-project-uuid>/.julia
    
  6. For running Julia in the Jupyter Notebook, you also need to install IJulia and your own jupyter kernel:
    $ julia
    > Pkg.init()
    > Pkg.add("IJulia")
    
    Then add this file into ~/.local/share/jupyter/kernels/julia-my/kernel.json:
{
  "display_name": "Julia (local)",
  "argv": [
    "/projects/<YOUR-PROJECT-UUID>/bin/julia",
    "-i",
    "--startup-file=yes",
    "/projects/<YOUR-PROJECT-UUID>/.julia/v0.5/IJulia/src/kernel.jl",
    "{connection_file}"
  ],
  "language": "julia"
}
Clone this wiki locally