-
Notifications
You must be signed in to change notification settings - Fork 217
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
- Get a 64 bit linux tarball: https://julialang.org/downloads/
- Extract it, and symlink from your
~/bin/julia
to it'sbin/julia
:cd; mkdir bin; cd bin ln -s ~/<extracted-tarball-dir>/bin/julia julia
- Make sure
~/bin
is in yourPATH
, e.g. by appendingexport PATH=$HOME/bin:$HOME/.local/bin:$PATH
to your~/.bashrc
file. - Tell Julia to use a package directory inside your project, add this line to your
~/.bashrc
:export JULIA_PKGDIR=$HOME/.julia
- 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
- For running Julia in the Jupyter Notebook, you also need to install IJulia and your own jupyter kernel:
$ julia > Pkg.init() > Pkg.add("IJulia")
- This should automatically add a kernel file at
~/.local/share/jupyter/kernels/julia-XXX/kernel.json
containing information like this. You have to add the JULIA_PKGDIR env variable:
{
"display_name": "Julia (XXX)",
"argv": [
"/projects/<YOUR-PROJECT-UUID>/bin/julia",
"-i",
"--startup-file=yes",
"--color=yes",
"/projects/<YOUR-PROJECT-UUID>/.julia/v0.5/IJulia/src/kernel.jl",
"{connection_file}"
],
"language": "julia",
"env": {
"JULIA_PKGDIR": "/projects/94169f5c-20cd-43f0-9bfd-8c62c9c56e6c/.julia"
}
}
(and don't forget the comma after "language": "julia"
)
Hence, after maybe refreshing the kernel list, an entry "Julia (XXX)" should show up.
This Wiki is for CoCalc.com.
A more structured documentation is the CoCalc User Manual.
For further questions, please contact us.