JupyterLab + code-server + Julia

I have grown very fond of the combo JupyterLab + code-server + <programming language>.

You may test it at https://demo.jupyter.b-data.ch/.
→ Resources are limited to 2 cores and 8 GB RAM.

I am happy to receive feedback.


For Julia, it runs registry.gitlab.b-data.ch/jupyterlab/julia/base.
→ A multi-arch (linux/amd64, linux/arm64/v8) docker image based on Debian including Julia, JupyterHub, JupyterLab, code-server (aka VS Code), Git, Git LFS, Pandoc, Zsh plus several popular VS Code extensions.

You may also run the image locally with Docker Desktop:

Initial command

docker run -it --rm -p 8888:8888 -v $PWD:/home/jovyan -e GEN_CERT=yes registry.gitlab.b-data.ch/jupyterlab/julia/base:1.7

Subsequent command

docker run -it --rm -p 8888:8888 -v $PWD:/home/jovyan registry.gitlab.b-data.ch/jupyterlab/julia/base:1.7 start-notebook.sh --NotebookApp.certfile=~/.local/share/jupyter/notebook.pem

→ The initial command must be run in an empty directory so that the container can populate it. Then, visit<token> in a browser to load JupyterLab.

I find Julia for Data Analysis > Setting up your environment rather complicated.

You should be able to work through Bogumił Kamiński’s book Julia for Data Analysis just fine with both the Jupyter demo environment and docker image.

P.S.: The linux/arm64/v8 image runs natively on Docker Desktop for Mac with Apple silicon.
P.P.S.: The RCall.jl package does not compile successfully, because R is not included in the image.

1 Like

Thank you for working on this!

1 Like

Thank you. This is great.

I was just about to create a topic for creating a datascience Docker image that includes Python, R, and Julia. Is that something that could be achieved with your image?

There ist the official jupyter/datascience-notebook image: Selecting an Image — Docker Stacks documentation

1 Like

I was just working with that for the last two days but it seems to cause problems with Intel/M1 combos. I googled whether a Docker image can be multiple-architecture (so for example, using the native Python and Julia for ARM but using x86 compiled R)

My images focus on one programming language per docker stack. With code-server as core application rather than JupyterLab.

There is registry.gitlab.b-data.ch/jupyterlab/r/verse and registry.gitlab.b-data.ch/jupyterlab/python/scipy.

My images are multi-arch (linux/amd64, linux/arm64/v8) and work fine on both Intel and M1 Macs.

Images in multi-arch manifests are in fact separate images. Docker just pulls one image depending on your architecture.

There is also registry.gitlab.b-data.ch/jupyterlab/julia/pubtools.
:point_right: pubtools = base + TinyTeX + Pandoc + Quarto

:information_source: Quarto is currently only available for amd64 architecture.

Tag latest of both images has been updated to Julia v1.8.0.

GPU accelerated images will be available soon. Stay tuned.

Together with some colleagues at UC Berkeley we have been working for a while on very similar setup to this one. We’re using a JupyterHub with code-server with both Julia and Python. We’re running this with both CPUs and GPUs, often for very large machines (64 cores, 1TB). Everything is working really well, it’s pretty amazing being able to work like this from any machine around the world, with just a simple browser. This has been lead by Fernando Pérez (co-creator of Jupyter) and there are some really talented developers constantly improving it.

For more details you can check the repo here: GitHub - pangeo-data/jupyter-earth: Jupyter meets the Earth: combining research use cases in geosciences with technical developments within the Jupyter and Pangeo ecosystems.

1 Like

The programming support for NVIDIA GPUs in Julia is provided by the CUDA.jl package. It does not require the entire CUDA toolkit installed [in the container], as it will automatically be downloaded when the package is first used.

If one has

  • Docker
  • NVIDIA Linux driver
  • NVIDIA Container Toolkit

installed, the images of the JupyterLab Julia docker stack are actually sufficient.

Nonetheless and since Python packages may require the CUDA toolkit: CUDA-enabled JupyterLab Julia docker stack

The latest (v1.8.5) JupyterLab Julia images have been updated to Python 3.11 (v3.11.3)[1].

The JupyterLab Julia pubtools image now also provides Quarto (v1.3.340) for arm64.

:point_right: See the Version Matrix for detailed information.

  1. :information_source: The latest Python version numba is compatible with is chosen for these docker images. ↩︎

The JupyterLab Julia docker stack has been updated to Julia v1.9.0.

1 Like

The JupyterLab Julia docker stack now provides code-server v4.13.0 (Code v1.78.2).

Now also available as part of my Data Science Dev Containers:

:information_source: For local use, on a remote SSH host or with GitHub Codespaces.

1 Like