Commit 75b2b0a7 authored by Felix Abecassis US's avatar Felix Abecassis US

Add experimental CUDA 9.2 on Ubuntu 18.04

parents
Pipeline #22223798 passed with stages
in 12 minutes and 19 seconds
image: docker:stable
services:
- docker:stable-dind
variables:
REPOSITORY: "${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}"
OS: "${CI_COMMIT_REF_NAME}"
before_script:
- docker login -u "${REGISTRY_USER}" -p "${REGISTRY_TOKEN}"
stages:
- cuda
- cudnn
.cuda_base_template: &cuda_base_definition
stage: cuda
script:
- VERSION="${CI_JOB_NAME:1}"
- docker build --pull -t "${REPOSITORY}:${VERSION}-base-${OS}"
--label "com.nvidia.build.ref=${CI_COMMIT_SHA}"
--label "com.nvidia.build.id=${CI_JOB_ID}"
"${VERSION}/base"
- docker build -t "${REPOSITORY}:${VERSION}-runtime-${OS}"
--build-arg "repository=${REPOSITORY}"
--label "com.nvidia.build.ref=${CI_COMMIT_SHA}"
--label "com.nvidia.build.id=${CI_JOB_ID}"
"${VERSION}/runtime"
- docker build -t "${REPOSITORY}:${VERSION}-devel-${OS}"
--build-arg "repository=${REPOSITORY}"
"${VERSION}/devel"
- if [[ "${NO_OS_SUFFIX}" == true ]]; then
docker tag "${REPOSITORY}:${VERSION}-base-${OS}" "${REPOSITORY}:${VERSION}-base";
docker tag "${REPOSITORY}:${VERSION}-runtime-${OS}" "${REPOSITORY}:${VERSION}-runtime";
docker tag "${REPOSITORY}:${VERSION}-devel-${OS}" "${REPOSITORY}:${VERSION}-devel";
fi
- if [[ "${LATEST}" == true ]]; then
docker tag "${REPOSITORY}:${VERSION}-devel-${OS}" "${REPOSITORY}:latest";
fi
- docker push "${REPOSITORY}"
.cudnn_template: &cudnn_definition
stage: cudnn
script:
- VERSION="${CI_JOB_NAME:1}"
- CUDA_VERSION="${CI_JOB_NAME:1:3}"
- CUDNN_VERSION="${CI_JOB_NAME:5}"
- docker build --pull -t "${REPOSITORY}:${VERSION}-runtime-${OS}"
--build-arg "repository=${REPOSITORY}"
"${CUDA_VERSION}/runtime/${CUDNN_VERSION}"
- docker build --pull -t "${REPOSITORY}:${VERSION}-devel-${OS}"
--build-arg "repository=${REPOSITORY}"
"${CUDA_VERSION}/devel/${CUDNN_VERSION}"
- if [[ "${NO_OS_SUFFIX}" == true ]]; then
docker tag "${REPOSITORY}:${VERSION}-runtime-${OS}" "${REPOSITORY}:${VERSION}-runtime";
docker tag "${REPOSITORY}:${VERSION}-devel-${OS}" "${REPOSITORY}:${VERSION}-devel";
fi
- docker push "${REPOSITORY}"
v9.2:
<<: *cuda_base_definition
v9.2-cudnn7:
<<: *cudnn_definition
FROM ubuntu:18.04
LABEL maintainer "NVIDIA CORPORATION <cudatools@nvidia.com>"
# CUDA 9.2 is not officially supported on ubuntu 18.04 yet, we use the ubuntu 17.10 repository for CUDA instead.
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/ubuntu1710/x86_64/7fa2af80.pub | apt-key add - && \
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1710/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \
echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/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 9.2.88
ENV CUDA_PKG_VERSION 9-2=$CUDA_VERSION-1
RUN apt-get update && apt-get install -y --no-install-recommends \
cuda-cudart-$CUDA_PKG_VERSION && \
ln -s cuda-9.2 /usr/local/cuda && \
rm -rf /var/lib/apt/lists/*
# nvidia-docker 1.0
LABEL com.nvidia.volumes.needed="nvidia_driver"
LABEL com.nvidia.cuda.version="${CUDA_VERSION}"
RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf
ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64
# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
ENV NVIDIA_REQUIRE_CUDA "cuda>=9.2"
ARG repository
FROM ${repository}:9.2-runtime-ubuntu18.04
LABEL maintainer "NVIDIA CORPORATION <cudatools@nvidia.com>"
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+cuda9.2 && \
rm -rf /var/lib/apt/lists/*
ENV LIBRARY_PATH /usr/local/cuda/lib64/stubs:${LIBRARY_PATH}
ARG repository
FROM ${repository}:9.2-devel-ubuntu18.04
LABEL maintainer "NVIDIA CORPORATION <cudatools@nvidia.com>"
ENV CUDNN_VERSION 7.1.4.18
LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}"
RUN apt-get update && apt-get install -y --no-install-recommends \
libcudnn7=$CUDNN_VERSION-1+cuda9.2 \
libcudnn7-dev=$CUDNN_VERSION-1+cuda9.2 && \
rm -rf /var/lib/apt/lists/*
ARG repository
FROM ${repository}:9.2-base-ubuntu18.04
LABEL maintainer "NVIDIA CORPORATION <cudatools@nvidia.com>"
ENV NCCL_VERSION 2.2.12
RUN apt-get update && apt-get install -y --no-install-recommends \
cuda-libraries-$CUDA_PKG_VERSION \
libnccl2=$NCCL_VERSION-1+cuda9.2 && \
rm -rf /var/lib/apt/lists/*
ARG repository
FROM ${repository}:9.2-runtime-ubuntu18.04
LABEL maintainer "NVIDIA CORPORATION <cudatools@nvidia.com>"
ENV CUDNN_VERSION 7.1.4.18
LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}"
RUN apt-get update && apt-get install -y --no-install-recommends \
libcudnn7=$CUDNN_VERSION-1+cuda9.2 && \
rm -rf /var/lib/apt/lists/*
Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of NVIDIA CORPORATION nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Ubuntu 18.04 [![build status](https://gitlab.com/nvidia/cuda/badges/ubuntu18.04/build.svg)](https://gitlab.com/nvidia/cuda/commits/ubuntu18.04)
## CUDA 9.2 (EXPERIMENTAL)
- [`9.2-base`, `9.2-base-ubuntu18.04` (*9.2/base/Dockerfile*)](https://gitlab.com/nvidia/cuda/blob/ubuntu18.04/9.2/base/Dockerfile)
- [`9.2-runtime`, `9.2-runtime-ubuntu18.04` (*9.2/runtime/Dockerfile*)](https://gitlab.com/nvidia/cuda/blob/ubuntu18.04/9.2/runtime/Dockerfile)
- [`9.2-devel`, `9.2-devel-ubuntu18.04` (*9.2/devel/Dockerfile*)](https://gitlab.com/nvidia/cuda/blob/ubuntu18.04/9.2/devel/Dockerfile)
- [`9.2-cudnn7-runtime`, `9.2-cudnn7-runtime-ubuntu18.04` (*9.2/runtime/cudnn7/Dockerfile*)](https://gitlab.com/nvidia/cuda/blob/ubuntu18.04/9.2/runtime/cudnn7/Dockerfile)
- [`9.2-cudnn7-devel`, `9.2-cudnn7-devel-ubuntu18.04` (*9.2/devel/cudnn7/Dockerfile*)](https://gitlab.com/nvidia/cuda/blob/ubuntu18.04/9.2/devel/cudnn7/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