55.PHONY : help create-host-workspace build build-gpu run run-gpu notebook notebook-gpu
66
77DOCKER_FILE =Dockerfile
8- BASE_IMG =ubuntu:18.04
9- BASE_CUDA_IMG =nvidia/cuda:11.5.0-cudnn8-runtime-ubuntu18.04
8+ BASE_IMG =ubuntu:24.04
109DOCKER_CMD =docker
11- DOCKER_GPU_CMD =nvidia-docker
1210HOST_WORK_DIR =${HOME}/pyro_docker
13- UID =$( shell id -u)
14- GID =$( shell id -g)
11+ UID =999
12+ GID =999
1513OSTYPE =$(shell uname)
1614USER =pyromancer
1715DOCKER_WORK_DIR =/home/${USER}/workspace/shared
1816pyro_git_url =https://github.com/pyro-ppl/pyro.git
1917
2018# Optional args
21- python_version? =3.6
19+ python_version? =3.12
2220pytorch_branch? =release
2321pyro_branch? =release
2422cmd? =bash
@@ -45,12 +43,11 @@ help:
4543
4644build : # #
4745 # # Build a docker image for running Pyro on a CPU.
48- # # Requires nvidia-docker (https://github.com/NVIDIA/nvidia-docker).
4946 # # Args:
50- # # python_version: version of python to use. default - python 3.6
47+ # # python_version: version of python to use. default - python 3.12
5148 # # pytorch_branch: whether to build PyTorch from conda or from source
5249 # # (git branch specified by pytorch_branch)
53- # # default - latest pytorch version on conda
50+ # # default - latest pytorch version on the torch python package index
5451 # # pyro_branch: whether to use the released Pyro wheel or a git branch.
5552 # # default - latest pyro-ppl wheel on pypi
5653 # #
@@ -66,21 +63,20 @@ build: ##
6663
6764build-gpu : # #
6865 # # Build a docker image for running Pyro on a GPU.
69- # # Requires nvidia-docker (https://github.com/NVIDIA/nvidia-docker).
7066 # # Args:
71- # # python_version: version of python to use. default - python 3.6
67+ # # python_version: version of python to use. default - python 3.12
7268 # # pytorch_branch: whether to build PyTorch from conda or from source
7369 # # (git branch specified by pytorch_branch)
74- # # default - latest pytorch version on conda
70+ # # default - latest pytorch version on the torch python package index
7571 # # pyro_branch: whether to use the released Pyro wheel or a git branch.
7672 # # default - latest pyro-ppl wheel on pypi
7773 # #
78- ${DOCKER_GPU_CMD } build -t ${IMG_NAME} \
79- --build-arg base_img=${BASE_CUDA_IMG } \
74+ ${DOCKER_CMD } build -t ${IMG_NAME} \
75+ --build-arg base_img=${BASE_IMG } \
8076 --build-arg uid=${UID} \
8177 --build-arg gid=${GID} \
8278 --build-arg ostype=${OSTYPE} \
83- --build-arg cuda=1 \
79+ --build-arg pytorch_whl=cu118 \
8480 --build-arg python_version=${python_version} \
8581 --build-arg pytorch_branch=${pytorch_branch} \
8682 --build-arg pyro_git_url=${pyro_git_url} \
0 commit comments