Skip to content

Commit 49192e4

Browse files
JanuszLklecki
authored andcommitted
Make base image for dockers customizable at the build time (#2427)
Signed-off-by: Janusz Lisiecki <[email protected]>
1 parent 40f321a commit 49192e4

8 files changed

+28
-16
lines changed

docker/Dockerfile.build.aarch64-linux

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ARG AARCH64_CUDA_TOOL_IMAGE_NAME
2+
ARG AARCH64_BASE_IMAGE=nvidia/cuda:10.2-devel-ubuntu18.04
23
FROM ${AARCH64_CUDA_TOOL_IMAGE_NAME} as aarch64_cuda_tools
3-
FROM nvidia/cuda:10.2-devel-ubuntu18.04
4+
FROM ${AARCH64_BASE_IMAGE}
45

56
ENV DEBIAN_FRONTEND=noninteractive
67

docker/Dockerfile.build.aarch64-qnx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ARG QNX_CUDA_TOOL_IMAGE_NAME
2+
ARG QNX_BASE_IMAGE=nvidia/cuda:10.0-devel-ubuntu16.04
23
FROM ${QNX_CUDA_TOOL_IMAGE_NAME} as qnx_cuda_tools
3-
FROM nvidia/cuda:10.0-devel-ubuntu16.04
4+
FROM ${QNX_BASE_IMAGE}
45

56
RUN apt-get update && apt-get install -y --no-install-recommends \
67
ca-certificates \

docker/Dockerfile.cuda100.x86_64.deps

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
FROM alpine as cuda
1+
ARG TOOLKIT_BASE_IMAGE=ubuntu:18.04
2+
FROM ${TOOLKIT_BASE_IMAGE} as cuda
23

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

67
RUN CUDA_VERSION=10.0 && \
78
CUDA_BUILD=10.0.130_410.48 && \

docker/Dockerfile.cuda110.aarch64.deps

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
FROM ubuntu:18.04 as cuda
1+
ARG TOOLKIT_BASE_IMAGE=ubuntu:18.04
2+
FROM ${TOOLKIT_BASE_IMAGE} as cuda
23

3-
RUN apt update && apt install -y libxml2 curl perl gcc
4+
RUN apt update && apt install -y libxml2 curl perl gcc && \
5+
rm -rf /var/lib/apt/lists/*
46

57
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 && \
68
chmod +x cuda_*.run && \

docker/Dockerfile.cuda110.x86_64.deps

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
FROM ubuntu:18.04 as cuda
1+
ARG BASE_IMAGE=ubuntu:18.04
2+
FROM ${BASE_IMAGE} as cuda
23

3-
RUN apt update && apt install -y libxml2 curl perl gcc
4+
RUN apt update && apt install -y libxml2 curl perl gcc && \
5+
rm -rf /var/lib/apt/lists/*
46

57
RUN curl -LO https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux.run && \
68
chmod +x cuda_*.run && \

docker/Dockerfile.cuda111.aarch64.deps

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
FROM ubuntu:18.04 as cuda
1+
ARG BASE_IMAGE=ubuntu:18.04
2+
FROM ${BASE_IMAGE} as cuda
23

3-
RUN apt update && apt install -y libxml2 curl perl gcc
4+
RUN apt update && apt install -y libxml2 curl perl gcc && \
5+
rm -rf /var/lib/apt/lists/*
46

57
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 && \
68
chmod +x cuda_*.run && \

docker/Dockerfile.cuda111.x86_64.deps

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
FROM ubuntu:18.04 as cuda
1+
ARG BASE_IMAGE=ubuntu:18.04
2+
FROM ${BASE_IMAGE} as cuda
23

3-
RUN apt update && apt install -y libxml2 curl perl gcc
4+
RUN apt update && apt install -y libxml2 curl perl gcc && \
5+
rm -rf /var/lib/apt/lists/*
46

57
RUN curl -LO https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux.run && \
68
chmod +x cuda_*.run && \

docker/Dockerfile.cuda90.x86_64.deps

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
FROM alpine as cuda
1+
ARG TOOLKIT_BASE_IMAGE=ubuntu:18.04
2+
FROM ${TOOLKIT_BASE_IMAGE} as cuda
23

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

67
RUN CUDA_VERSION=9.0 && \
78
CUDA_BUILD=9.0.176_384.81 && \

0 commit comments

Comments
 (0)