Skip to content

Commit

Permalink
Make base image for dockers customizable at the build time (#2427)
Browse files Browse the repository at this point in the history
Signed-off-by: Janusz Lisiecki <[email protected]>
  • Loading branch information
JanuszL authored and klecki committed Nov 3, 2020
1 parent 40f321a commit 49192e4
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 16 deletions.
3 changes: 2 additions & 1 deletion docker/Dockerfile.build.aarch64-linux
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG AARCH64_CUDA_TOOL_IMAGE_NAME
ARG AARCH64_BASE_IMAGE=nvidia/cuda:10.2-devel-ubuntu18.04
FROM ${AARCH64_CUDA_TOOL_IMAGE_NAME} as aarch64_cuda_tools
FROM nvidia/cuda:10.2-devel-ubuntu18.04
FROM ${AARCH64_BASE_IMAGE}

ENV DEBIAN_FRONTEND=noninteractive

Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile.build.aarch64-qnx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG QNX_CUDA_TOOL_IMAGE_NAME
ARG QNX_BASE_IMAGE=nvidia/cuda:10.0-devel-ubuntu16.04
FROM ${QNX_CUDA_TOOL_IMAGE_NAME} as qnx_cuda_tools
FROM nvidia/cuda:10.0-devel-ubuntu16.04
FROM ${QNX_BASE_IMAGE}

RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
Expand Down
7 changes: 4 additions & 3 deletions docker/Dockerfile.cuda100.x86_64.deps
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM alpine as cuda
ARG TOOLKIT_BASE_IMAGE=ubuntu:18.04
FROM ${TOOLKIT_BASE_IMAGE} as cuda

# CUDA toolkit needs gcc to be callable during installation even if it does nothing
RUN apk add curl perl && ln -s /bin/ls /bin/gcc
RUN apt update && apt install -y libxml2 curl perl gcc && \
rm -rf /var/lib/apt/lists/*

RUN CUDA_VERSION=10.0 && \
CUDA_BUILD=10.0.130_410.48 && \
Expand Down
6 changes: 4 additions & 2 deletions docker/Dockerfile.cuda110.aarch64.deps
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM ubuntu:18.04 as cuda
ARG TOOLKIT_BASE_IMAGE=ubuntu:18.04
FROM ${TOOLKIT_BASE_IMAGE} as cuda

RUN apt update && apt install -y libxml2 curl perl gcc
RUN apt update && apt install -y libxml2 curl perl gcc && \
rm -rf /var/lib/apt/lists/*

RUN curl -LO https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux_sbsa.run && \
chmod +x cuda_*.run && \
Expand Down
6 changes: 4 additions & 2 deletions docker/Dockerfile.cuda110.x86_64.deps
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM ubuntu:18.04 as cuda
ARG BASE_IMAGE=ubuntu:18.04
FROM ${BASE_IMAGE} as cuda

RUN apt update && apt install -y libxml2 curl perl gcc
RUN apt update && apt install -y libxml2 curl perl gcc && \
rm -rf /var/lib/apt/lists/*

RUN curl -LO https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux.run && \
chmod +x cuda_*.run && \
Expand Down
6 changes: 4 additions & 2 deletions docker/Dockerfile.cuda111.aarch64.deps
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM ubuntu:18.04 as cuda
ARG BASE_IMAGE=ubuntu:18.04
FROM ${BASE_IMAGE} as cuda

RUN apt update && apt install -y libxml2 curl perl gcc
RUN apt update && apt install -y libxml2 curl perl gcc && \
rm -rf /var/lib/apt/lists/*

RUN curl -LO https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux_sbsa.run && \
chmod +x cuda_*.run && \
Expand Down
6 changes: 4 additions & 2 deletions docker/Dockerfile.cuda111.x86_64.deps
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM ubuntu:18.04 as cuda
ARG BASE_IMAGE=ubuntu:18.04
FROM ${BASE_IMAGE} as cuda

RUN apt update && apt install -y libxml2 curl perl gcc
RUN apt update && apt install -y libxml2 curl perl gcc && \
rm -rf /var/lib/apt/lists/*

RUN curl -LO https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux.run && \
chmod +x cuda_*.run && \
Expand Down
7 changes: 4 additions & 3 deletions docker/Dockerfile.cuda90.x86_64.deps
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM alpine as cuda
ARG TOOLKIT_BASE_IMAGE=ubuntu:18.04
FROM ${TOOLKIT_BASE_IMAGE} as cuda

# CUDA toolkit needs gcc to be callable during installation even if it does nothing
RUN apk add curl perl && ln -s /bin/ls /bin/gcc
RUN apt update && apt install -y libxml2 curl perl gcc && \
rm -rf /var/lib/apt/lists/*

RUN CUDA_VERSION=9.0 && \
CUDA_BUILD=9.0.176_384.81 && \
Expand Down

0 comments on commit 49192e4

Please sign in to comment.