From 61d7fd66bad442650d3d63192126cf798fdf2616 Mon Sep 17 00:00:00 2001 From: Erik Tollerud Date: Thu, 2 May 2024 11:05:04 -0400 Subject: [PATCH 1/2] add jupyterlab option to makefile --- docker/Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docker/Makefile b/docker/Makefile index 03051eaa82..f9ffcf4faf 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} @@ -128,3 +130,25 @@ notebook-gpu: ## 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 + + From 61bc4904755d719dcc62d9afe683ae64144995f6 Mon Sep 17 00:00:00 2001 From: Erik Tollerud Date: Thu, 2 May 2024 11:06:05 -0400 Subject: [PATCH 2/2] fix very minor typo --- docker/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Makefile b/docker/Makefile index f9ffcf4faf..d13ff2f351 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -123,7 +123,7 @@ 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`. ##