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

Update Docker base images for conda and libtorch #1448

Merged
merged 3 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion conda/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG CUDA_VERSION=10.2
ARG BASE_TARGET=cuda${CUDA_VERSION}
FROM nvidia/cuda:9.2-devel-centos7 as base
FROM centos:7 as base

ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
Expand Down
8 changes: 2 additions & 6 deletions conda/build_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ set -eou pipefail
export DOCKER_BUILDKIT=1
TOPDIR=$(git rev-parse --show-toplevel)

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

case ${CUDA_VERSION} in
cpu)
Expand All @@ -32,7 +28,7 @@ esac
--target final \
--build-arg "BASE_TARGET=${BASE_TARGET}" \
--build-arg "CUDA_VERSION=${CUDA_VERSION}" \
--build-arg "DEVTOOLSET_VERSION=${DEVTOOLSET_VERSION}" \
--build-arg "DEVTOOLSET_VERSION=9" \
-t "pytorch/conda-builder:${DOCKER_TAG}" \
-f "${TOPDIR}/conda/Dockerfile" \
${TOPDIR}
Expand Down
4 changes: 2 additions & 2 deletions libtorch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
ARG BASE_TARGET=base
ARG GPU_IMAGE=nvidia/cuda:10.2-devel-ubuntu18.04
ARG GPU_IMAGE=ubuntu:18.04
FROM ${GPU_IMAGE} as base

ENV DEBIAN_FRONTEND=noninteractive

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

Expand Down
4 changes: 2 additions & 2 deletions libtorch/build_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ case ${GPU_ARCH_TYPE} in
cpu)
BASE_TARGET=cpu
DOCKER_TAG=cpu
GPU_IMAGE=nvidia/cuda:10.2-devel-ubuntu18.04
GPU_IMAGE=ubuntu:18.04
DOCKER_GPU_BUILD_ARG=""
;;
cuda)
BASE_TARGET=cuda${GPU_ARCH_VERSION}
DOCKER_TAG=cuda${GPU_ARCH_VERSION}
GPU_IMAGE=nvidia/cuda:10.2-devel-ubuntu18.04
GPU_IMAGE=ubuntu:18.04
DOCKER_GPU_BUILD_ARG=""
;;
rocm)
Expand Down