Commit e4bb39bc authored by Jesus Alvarez's avatar Jesus Alvarez

Add Cuda 10.1 and update cuDNN to v7.5

parent 3f492a50
......@@ -4,30 +4,37 @@ services:
- docker:stable-dind
variables:
REPOSITORY: "${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}"
REPOSITORY_STAGING: "gitlab-master.nvidia.com:5005/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}"
REPOSITORY_PROD: "${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}"
OS: "${CI_COMMIT_REF_NAME}"
before_script:
- docker login -u "${REGISTRY_USER}" -p "${REGISTRY_TOKEN}"
- if [[ -z $NV_CI_INTERNAL ]]; then export REPOSITORY=$REPOSITORY_PROD; else export REPOSITORY=$REPOSITORY_STAGING; fi
- if [[ -z $NV_CI_INTERNAL ]]; then
docker login -u "${REGISTRY_USER}" -p "${REGISTRY_TOKEN}";
else
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN gitlab-master.nvidia.com:5005;
fi
stages:
- cuda
- cudnn
- test
- deploy
.cuda_base_template: &cuda_base_definition
stage: cuda
tags:
- cuda-docker
script:
- VERSION="${CI_JOB_NAME:1}"
- docker pull "${REPOSITORY}:${VERSION}-base-${OS}" || true
- docker build --pull -t "${REPOSITORY}:${VERSION}-base-${OS}"
- docker build -t "${REPOSITORY}:${VERSION}-base-${OS}"
--cache-from "${REPOSITORY}:${VERSION}-base-${OS}-disable"
"${VERSION}/base"
- docker pull "${REPOSITORY}:${VERSION}-runtime-${OS}" || true
- docker build -t "${REPOSITORY}:${VERSION}-runtime-${OS}"
--cache-from "${REPOSITORY}:${VERSION}-runtime-${OS}-disable"
--build-arg "repository=${REPOSITORY}"
"${VERSION}/runtime"
- docker pull "${REPOSITORY}:${VERSION}-devel-${OS}" || true
- docker build -t "${REPOSITORY}:${VERSION}-devel-${OS}"
--cache-from "${REPOSITORY}:${VERSION}-devel-${OS}-disable"
--build-arg "repository=${REPOSITORY}"
......@@ -40,21 +47,22 @@ stages:
- if [[ "${LATEST}" == true ]]; then
docker tag "${REPOSITORY}:${VERSION}-devel-${OS}" "${REPOSITORY}:latest";
fi
- docker push "${REPOSITORY}"
.cudnn_template: &cudnn_definition
stage: cudnn
tags:
- cuda-docker
script:
- VERSION="${CI_JOB_NAME:1}"
- CUDA_VERSION="${VERSION%-*}"
- CUDNN_VERSION="${VERSION#*-}"
- docker pull "${REPOSITORY}:${VERSION}-runtime-${OS}" || true
- docker build --pull -t "${REPOSITORY}:${VERSION}-runtime-${OS}"
- docker images
- docker ps
- docker build -t "${REPOSITORY}:${VERSION}-runtime-${OS}"
--cache-from "${REPOSITORY}:${VERSION}-runtime-${OS}-disable"
--build-arg "repository=${REPOSITORY}"
"${CUDA_VERSION}/runtime/${CUDNN_VERSION}"
- docker pull "${REPOSITORY}:${VERSION}-devel-${OS}" || true
- docker build --pull -t "${REPOSITORY}:${VERSION}-devel-${OS}"
- docker build -t "${REPOSITORY}:${VERSION}-devel-${OS}"
--cache-from "${REPOSITORY}:${VERSION}-devel-${OS}-disable"
--build-arg "repository=${REPOSITORY}"
"${CUDA_VERSION}/devel/${CUDNN_VERSION}"
......@@ -62,12 +70,24 @@ stages:
docker tag "${REPOSITORY}:${VERSION}-runtime-${OS}" "${REPOSITORY}:${VERSION}-runtime";
docker tag "${REPOSITORY}:${VERSION}-devel-${OS}" "${REPOSITORY}:${VERSION}-devel";
fi
- docker push "${REPOSITORY}"
deploy:
stage: deploy
tags:
- cuda-docker
script:
- docker push ${REPOSITORY}
v9.2:
variables:
NO_OS_SUFFIX: "true"
LATEST: "true"
<<: *cuda_base_definition
v9.2-cudnn7:
variables:
NO_OS_SUFFIX: "true"
LATEST: "true"
<<: *cudnn_definition
v10.0:
......@@ -79,4 +99,17 @@ v10.0:
v10.0-cudnn7:
variables:
NO_OS_SUFFIX: "true"
LATEST: "true"
<<: *cudnn_definition
v10.1:
variables:
NO_OS_SUFFIX: "true"
LATEST: "true"
<<: *cuda_base_definition
v10.1-cudnn7:
variables:
NO_OS_SUFFIX: "true"
LATEST: "true"
<<: *cudnn_definition
......@@ -2,7 +2,7 @@ ARG repository
FROM ${repository}:10.0-devel-ubuntu18.04
LABEL maintainer "NVIDIA CORPORATION <[email protected]>"
ENV CUDNN_VERSION 7.4.2.24
ENV CUDNN_VERSION 7.5.0.56
LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}"
RUN apt-get update && apt-get install -y --no-install-recommends \
......
......@@ -2,7 +2,7 @@ ARG repository
FROM ${repository}:10.0-runtime-ubuntu18.04
LABEL maintainer "NVIDIA CORPORATION <[email protected]>"
ENV CUDNN_VERSION 7.4.2.24
ENV CUDNN_VERSION 7.5.0.56
LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}"
RUN apt-get update && apt-get install -y --no-install-recommends \
......
FROM ubuntu:18.04
LABEL maintainer "NVIDIA CORPORATION <[email protected]>"
RUN apt-get update && apt-get install -y --no-install-recommends gnupg2 curl ca-certificates && \
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | apt-key add - && \
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \
echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list && \
apt-get purge --autoremove -y curl && \
rm -rf /var/lib/apt/lists/*
ENV CUDA_VERSION 10.1.105
ENV CUDA_PKG_VERSION 10-1=$CUDA_VERSION-1
# For libraries in the cuda-compat-* package: https://docs.nvidia.com/cuda/eula/index.html#attachment-a
RUN apt-get update && apt-get install -y --no-install-recommends \
cuda-cudart-$CUDA_PKG_VERSION \
cuda-compat-10-1=418.39-1 && \
ln -s cuda-10.1 /usr/local/cuda && \
rm -rf /var/lib/apt/lists/*
ENV PATH /usr/local/cuda/bin:${PATH}
# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
ENV NVIDIA_REQUIRE_CUDA "cuda>=10.1 brand=tesla,driver>=418,driver<419"
ARG repository
FROM ${repository}:10.1-runtime-ubuntu18.04
LABEL maintainer "NVIDIA CORPORATION <[email protected]>"
RUN apt-get update && apt-get install -y --no-install-recommends \
cuda-libraries-dev-$CUDA_PKG_VERSION \
cuda-nvml-dev-$CUDA_PKG_VERSION \
cuda-minimal-build-$CUDA_PKG_VERSION \
cuda-command-line-tools-$CUDA_PKG_VERSION \
libnccl-dev=$NCCL_VERSION-1+cuda10.1 && \
rm -rf /var/lib/apt/lists/*
ENV LIBRARY_PATH /usr/local/cuda/lib64/stubs
ARG repository
FROM ${repository}:10.1-devel-ubuntu18.04
LABEL maintainer "NVIDIA CORPORATION <[email protected]>"
ENV CUDNN_VERSION 7.5.0.56
LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}"
RUN apt-get update && apt-get install -y --no-install-recommends \
libcudnn7=$CUDNN_VERSION-1+cuda10.1 \
libcudnn7-dev=$CUDNN_VERSION-1+cuda10.1 && \
apt-mark hold libcudnn7 && \
rm -rf /var/lib/apt/lists/*
ARG repository
FROM ${repository}:10.1-base-ubuntu18.04
LABEL maintainer "NVIDIA CORPORATION <[email protected]>"
ENV NCCL_VERSION 2.4.2
RUN apt-get update && apt-get install -y --no-install-recommends \
cuda-libraries-$CUDA_PKG_VERSION \
cuda-nvtx-$CUDA_PKG_VERSION \
libnccl2=$NCCL_VERSION-1+cuda10.1 && \
apt-mark hold libnccl2 && \
rm -rf /var/lib/apt/lists/*
ARG repository
FROM ${repository}:10.1-runtime-ubuntu18.04
LABEL maintainer "NVIDIA CORPORATION <[email protected]>"
ENV CUDNN_VERSION 7.5.0.56
LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}"
RUN apt-get update && apt-get install -y --no-install-recommends \
libcudnn7=$CUDNN_VERSION-1+cuda10.1 && \
apt-mark hold libcudnn7 && \
rm -rf /var/lib/apt/lists/*
# Ubuntu 18.04 [![build status](https://gitlab.com/nvidia/cuda/badges/ubuntu18.04/build.svg)](https://gitlab.com/nvidia/cuda/commits/ubuntu18.04)
## CUDA 10.1 (requires nvidia-docker v2)
- [`10.1-base`, `10.1-base-ubuntu18.04` (*10.1/base/Dockerfile*)](https://gitlab.com/nvidia/cuda/blob/ubuntu18.04/10.1/base/Dockerfile)
- [`10.1-runtime`,`10.1-runtime-ubuntu18.04` (*10.1/runtime/Dockerfile*)](https://gitlab.com/nvidia/cuda/blob/ubuntu18.04/10.1/runtime/Dockerfile)
- [`latest`, `10.1-devel`, `10.1-devel-ubuntu18.04` (*10.1/devel/Dockerfile*)](https://gitlab.com/nvidia/cuda/blob/ubuntu18.04/10.1/devel/Dockerfile)
- [`10.1-cudnn7-runtime`, `10.1-cudnn7-runtime-ubuntu18.04` (*10.1/runtime/cudnn7/Dockerfile*)](https://gitlab.com/nvidia/cuda/blob/ubuntu18.04/10.1/runtime/cudnn7/Dockerfile)
- [`10.1-cudnn7-devel`, `10.1-cudnn7-devel-ubuntu18.04` (*10.1/devel/cudnn7/Dockerfile*)](https://gitlab.com/nvidia/cuda/blob/ubuntu18.04/10.1/devel/cudnn7/Dockerfile)
## CUDA 10.0 (requires nvidia-docker v2)
- [`10.0-base`, `10.0-base-ubuntu18.04` (*10.0/base/Dockerfile*)](https://gitlab.com/nvidia/cuda/blob/ubuntu18.04/10.0/base/Dockerfile)
- [`10.0-runtime`,`10.0-runtime-ubuntu18.04` (*10.0/runtime/Dockerfile*)](https://gitlab.com/nvidia/cuda/blob/ubuntu18.04/10.0/runtime/Dockerfile)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment