Skip to content

Commit

Permalink
add jupyterlab option to makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
eteq committed May 2, 2024
1 parent c6cd2a1 commit 61d7fd6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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


0 comments on commit 61d7fd6

Please sign in to comment.