Skip to content

Commit 70bc20d

Browse files
authored
Update Docker base images for conda and libtorch (#1448)
Followup after #1446 CUDA-10.2 and moreover CUDA-9.2 docker images are gone per [Nvidia's Container Support Policy](https://gitlab.com/nvidia/container-images/cuda/blob/master/doc/support-policy.md): > After a period of Six Months time, the EOL tags WILL BE DELETED from Docker Hub and Nvidia GPU Cloud (NGC). This deletion ensures unsupported tags (and image layers) are not left lying around for customers to continue using after they have long been abandoned. Also, as all our Docker script install CUDA toolkit anyway, what's the point of using `nvidia/cuda` images at all instead of `centos:7`/`ubuntu:18.04` that former are based on, according to https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.4.3/centos7/base/Dockerfile Explicitly install `g++` to `libtorch/Docker` base image, as it's needed by `patchelf` Please note, that `libtorch/Docker` can not be completed without buildkit, as `rocm` step depends on `python3` which is not available in `cpu` image
1 parent 2578481 commit 70bc20d

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

conda/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG CUDA_VERSION=10.2
22
ARG BASE_TARGET=cuda${CUDA_VERSION}
3-
FROM nvidia/cuda:9.2-devel-centos7 as base
3+
FROM centos:7 as base
44

55
ENV LC_ALL en_US.UTF-8
66
ENV LANG en_US.UTF-8

conda/build_docker.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ set -eou pipefail
55
export DOCKER_BUILDKIT=1
66
TOPDIR=$(git rev-parse --show-toplevel)
77

8-
CUDA_VERSION=${CUDA_VERSION:-10.2}
9-
DEVTOOLSET_VERSION="9"
10-
if [[ ${CUDA_VERSION:0:2} == "10" ]]; then
11-
DEVTOOLSET_VERSION="7"
12-
fi
8+
CUDA_VERSION=${CUDA_VERSION:-11.7}
139

1410
case ${CUDA_VERSION} in
1511
cpu)
@@ -32,7 +28,7 @@ esac
3228
--target final \
3329
--build-arg "BASE_TARGET=${BASE_TARGET}" \
3430
--build-arg "CUDA_VERSION=${CUDA_VERSION}" \
35-
--build-arg "DEVTOOLSET_VERSION=${DEVTOOLSET_VERSION}" \
31+
--build-arg "DEVTOOLSET_VERSION=9" \
3632
-t "pytorch/conda-builder:${DOCKER_TAG}" \
3733
-f "${TOPDIR}/conda/Dockerfile" \
3834
${TOPDIR}

libtorch/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
ARG BASE_TARGET=base
2-
ARG GPU_IMAGE=nvidia/cuda:10.2-devel-ubuntu18.04
2+
ARG GPU_IMAGE=ubuntu:18.04
33
FROM ${GPU_IMAGE} as base
44

55
ENV DEBIAN_FRONTEND=noninteractive
66

77
RUN apt-get clean && apt-get update
8-
RUN apt-get install -y curl locales git-all autoconf automake make cmake wget unzip
8+
RUN apt-get install -y curl locales g++ git-all autoconf automake make cmake wget unzip
99
# Just add everything as a safe.directory for git since these will be used in multiple places with git
1010
RUN git config --global --add safe.directory '*'
1111

libtorch/build_docker.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ case ${GPU_ARCH_TYPE} in
1515
cpu)
1616
BASE_TARGET=cpu
1717
DOCKER_TAG=cpu
18-
GPU_IMAGE=nvidia/cuda:10.2-devel-ubuntu18.04
18+
GPU_IMAGE=ubuntu:18.04
1919
DOCKER_GPU_BUILD_ARG=""
2020
;;
2121
cuda)
2222
BASE_TARGET=cuda${GPU_ARCH_VERSION}
2323
DOCKER_TAG=cuda${GPU_ARCH_VERSION}
24-
GPU_IMAGE=nvidia/cuda:10.2-devel-ubuntu18.04
24+
GPU_IMAGE=ubuntu:18.04
2525
DOCKER_GPU_BUILD_ARG=""
2626
;;
2727
rocm)

0 commit comments

Comments
 (0)