Skip to content

Commit

Permalink
#2082: Update dockerfile for nvidia to select compiler version
Browse files Browse the repository at this point in the history
  • Loading branch information
thearusable committed Mar 14, 2023
1 parent 64d3700 commit 14c8958
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ci/docker/ubuntu-nvidia-cpp.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,21 @@ ARG arch=amd64
ARG ubuntu=20.04
FROM --platform=${arch} nvidia/cuda:${compiler}-devel-ubuntu${ubuntu} as base

ARG host_compiler=gcc-9
ARG proxy=""

ENV https_proxy=${proxy} \
http_proxy=${proxy}

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update -y -q && \
RUN apt-get update -y && \
apt-get install -y software-properties-common --no-install-recommends && \
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
apt remove -y software-properties-common && \
apt-get install -y --no-install-recommends \
ca-certificates \
g++-$(echo ${host_compiler} | cut -d- -f2) \
curl \
less \
git \
Expand All @@ -28,6 +33,7 @@ RUN apt-get update -y -q && \
libunwind-dev \
valgrind \
ccache && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand All @@ -48,6 +54,7 @@ RUN mkdir -p /nvcc_wrapper/build && \
chmod +x /nvcc_wrapper/build/nvcc_wrapper

ENV MPI_EXTRA_FLAGS="" \
HOST_COMPILER=${host_compiler} \
PATH=/usr/lib/ccache/:/nvcc_wrapper/build:$PATH \
CXX=nvcc_wrapper

Expand Down

0 comments on commit 14c8958

Please sign in to comment.