Skip to content

Commit e22622d

Browse files
committed
Update GPU docker makefile.
1 parent e1293e6 commit e22622d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docker/Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
DOCKER_FILE=Dockerfile
88
BASE_IMG=ubuntu:24.04
9+
BASE_CUDA_IMG=nvidia/cuda:12.6.3-cudnn-runtime-ubuntu24.04
910
DOCKER_CMD=docker
1011
HOST_WORK_DIR=${HOME}/pyro_docker
1112
UID=999
@@ -72,11 +73,11 @@ build-gpu: ##
7273
## default - latest pyro-ppl wheel on pypi
7374
##
7475
${DOCKER_CMD} build -t ${IMG_NAME} \
75-
--build-arg base_img=${BASE_IMG} \
76+
--build-arg base_img=${BASE_CUDA_IMG} \
7677
--build-arg uid=${UID} \
7778
--build-arg gid=${GID} \
7879
--build-arg ostype=${OSTYPE} \
79-
--build-arg pytorch_whl=cu118 \
80+
--build-arg pytorch_whl=cu126 \
8081
--build-arg python_version=${python_version} \
8182
--build-arg pytorch_branch=${pytorch_branch} \
8283
--build-arg pyro_git_url=${pyro_git_url} \
@@ -107,7 +108,7 @@ run-gpu: ##
107108
## cmd: command invoked on running a docker instance.
108109
## default - bash
109110
##
110-
docker run --init --runtime=nvidia -it --user ${USER} \
111+
docker run --init --gpus=all -it --user ${USER} \
111112
-v ${HOST_WORK_DIR}:${DOCKER_WORK_DIR} \
112113
${IMG_NAME} ${cmd}
113114

@@ -127,7 +128,7 @@ notebook-gpu: ##
127128
## Args:
128129
## img: use image name given by `img`.
129130
##
130-
docker run --runtime=nvidia --init -it -p 8888:8888 --user ${USER} \
131+
docker run --gpus=all --init -it -p 8888:8888 --user ${USER} \
131132
-v ${HOST_WORK_DIR}:${DOCKER_WORK_DIR} \
132133
${IMG_NAME}
133134

@@ -147,7 +148,7 @@ lab-gpu: ##
147148
## Args:
148149
## img: use image name given by `img`.
149150
##
150-
docker run --runtime=nvidia --init -it -p 8888:8888 --user ${USER} \
151+
docker run --gpus=all --init -it -p 8888:8888 --user ${USER} \
151152
-v ${HOST_WORK_DIR}:${DOCKER_WORK_DIR} \
152153
${IMG_NAME} jupyter lab --port=8888 --no-browser --ip=0.0.0.0
153154

0 commit comments

Comments
 (0)