Skip to content

Instantly share code, notes, and snippets.

@mjkloeckner
Last active September 11, 2024 16:25
Show Gist options
  • Save mjkloeckner/4ede3c2bc30a1d57c5a24f76f68f191b to your computer and use it in GitHub Desktop.
Save mjkloeckner/4ede3c2bc30a1d57c5a24f76f68f191b to your computer and use it in GitHub Desktop.
run jupyter notebook from *nix shell using docker
#!/bin/sh
# https://jupyter-docker-stacks.readthedocs.io/en/latest/index.html
# https://jupyter-docker-stacks.readthedocs.io/en/latest/using/common.html#alternative-commands
systemctl is-active --quiet docker || systemctl start docker
systemctl is-active --quiet containerd || systemctl start containerd
docker run \
-p 8888:8888 \
-e DOCKER_STACKS_JUPYTER_CMD=notebook \
-v "${PWD}":/home/jovyan/work jupyter/datascience-notebook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment