Last active
September 11, 2024 16:25
Revisions
-
mjkloeckner revised this gist
Sep 11, 2024 . 1 changed file with 22 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,27 @@ systemctl is-active --quiet docker || systemctl start docker systemctl is-active --quiet containerd || systemctl start containerd PORT=8888 # if port in use increment port number until port number is available while $(nc -vz 127.0.0.1 $PORT >/dev/null 2>&1) do PORT=$((PORT + 1)) done test -e "$HOME"/.jupyter || mkdir "$HOME"/.jupyter docker run \ -it --rm \ -p $PORT:8888 \ -e DOCKER_STACKS_JUPYTER_CMD=notebook \ -e JUPYTERLAB_ENABLED=false \ -v "${PWD}":/home/jovyan/work \ -v "$HOME"/.jupyter/:/home/jovyan/.jupyter \ -d jupyter/datascience-notebook \ start-notebook.py --NotebookApp.token='' --custom-css test $? -eq 0 && CONTAINER_NAME="$(docker ps -l --format "{{.Names}}")" echo "Running on container '$CONTAINER_NAME' with address: http://localhost:$PORT" sleep 3 && explorer.exe "http://localhost:$PORT" >/dev/null 2>&1 & -
mjkloeckner revised this gist
Aug 31, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #!/bin/sh # https://jupyter-docker-stacks.readthedocs.io/en/latest/index.html # https://docs.docker.com/reference/cli/docker/container/exec/ systemctl is-active --quiet docker || systemctl start docker systemctl is-active --quiet containerd || systemctl start containerd -
mjkloeckner revised this gist
Aug 31, 2024 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,8 @@ #!/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 -
mjkloeckner created this gist
Aug 31, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ #!/bin/sh 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