# gpu-base-image-build ## 构建命令 - 基于[pytorch官方镜像](https://hub.docker.com/r/pytorch/pytorch)构建镜像 ```bash ./build_ubuntu.sh jupyterlab \ juypterlab-pytorch:2.3.1-py3.10-cuda12.1-ubuntu22.04 \ pytorch/pytorch:2.3.1-cuda12.1-cudnn8-runtime ``` - 参数1: framework,不需要改动 - 参数2: 输出镜像名称 - 参数3: 基础镜像 - 基于[nvidia官方镜像](https://hub.docker.com/r/nvidia/cuda)构建镜像 ```bash ./build_ubuntu.sh jupyterlab \ juypterlab-pytorch:2.3.1-py3.8-cuda12.1-ubuntu22.04 \ nvidia/cuda:12.1.0-cudnn8-runtime-ubuntu22.04 \ TORCH_VERSION="2.3.1" \ TORCHVISION_VERSION="0.18.1" \ TORCHAUDIO_VERSION="2.3.1" \ CONDA_URL="https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py38_22.11.1-1-Linux-x86_64.sh" ``` - 参数1: framework,不需要改动 - 参数2: 输出镜像名称 - 参数3: 基础镜像 ## 验证镜像 -