From 5ba6232c45eb8618868e0aa9af9af6437ea39e75 Mon Sep 17 00:00:00 2001 From: Erik Tollerud Date: Thu, 2 May 2024 13:31:27 -0400 Subject: [PATCH] Add jupyter lab option to docker Makefile (#3363) --- docker/Makefile | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/docker/Makefile b/docker/Makefile index 03051eaa82..d13ff2f351 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -22,6 +22,8 @@ cmd?=bash # Determine name of docker image build run notebook: img_prefix=pyro-cpu build-gpu run-gpu notebook-gpu: img_prefix=pyro-gpu +build run lab: img_prefix=pyro-cpu +build-gpu run-gpu lab-gpu: img_prefix=pyro-gpu ifeq ($(img), ) IMG_NAME=${img_prefix}-${pyro_branch}-${python_version} @@ -121,10 +123,32 @@ notebook: ## notebook-gpu: create-host-workspace notebook-gpu: ## - ## Start a juptyer notebook on the Pyro GPU docker container. + ## Start a jupyter notebook on the Pyro GPU docker container. ## Args: ## img: use image name given by `img`. ## docker run --runtime=nvidia --init -it -p 8888:8888 --user ${USER} \ -v ${HOST_WORK_DIR}:${DOCKER_WORK_DIR} \ ${IMG_NAME} + + notebook: create-host-workspace +lab: ## + ## Start jupyterlab on the Pyro CPU docker container. + ## Args: + ## img: use image name given by `img`. + ## + docker run --init -it -p 8888:8888 --user ${USER} \ + -v ${HOST_WORK_DIR}:${DOCKER_WORK_DIR} \ + ${IMG_NAME} jupyter lab --port=8888 --no-browser --ip=0.0.0.0 + +lab-gpu: create-host-workspace +lab-gpu: ## + ## Start jupyterlab on the Pyro GPU docker container. + ## Args: + ## img: use image name given by `img`. + ## + docker run --runtime=nvidia --init -it -p 8888:8888 --user ${USER} \ + -v ${HOST_WORK_DIR}:${DOCKER_WORK_DIR} \ + ${IMG_NAME} jupyter lab --port=8888 --no-browser --ip=0.0.0.0 + +