Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jupyter lab option to docker Makefile #3363

Merged
merged 2 commits into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion 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 @@ -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


Loading