Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Add support for clang-15 #332

Merged
merged 1 commit into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 59 additions & 46 deletions environments/linux/docker/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ services:
target: devenv
args: &ubuntu22-args
BUILDKIT_INLINE_CACHE: "1"
ROOT_IMAGE: "nvcr.io/nvidia/cuda:11.7.1-devel-ubuntu22.04"
COMPILERS: "g++-11 g++-12 clang-12 clang-13 clang-11 clang-14"
ROOT_IMAGE: "nvcr.io/nvidia/cuda:11.8.0-devel-ubuntu22.04"
COMPILERS: "g++-11 g++-12 clang-11 clang-12 clang-13 clang-14 clang-15"
deploy: &deploy-template
resources:
reservations:
Expand All @@ -36,8 +36,8 @@ services:
target: devenv
args: &ubuntu20-args
BUILDKIT_INLINE_CACHE: "1"
ROOT_IMAGE: "nvcr.io/nvidia/cuda:11.7.1-devel-ubuntu20.04"
COMPILERS: "g++-10 g++-9 g++-8 clang-9 clang-8 clang-10"
ROOT_IMAGE: "nvcr.io/nvidia/cuda:11.8.0-devel-ubuntu20.04"
COMPILERS: "g++-8 g++-9 g++-10 clang-8 clang-9 clang-10"
deploy: *deploy-template

ubuntu18.04:
Expand All @@ -53,8 +53,8 @@ services:
target: devenv
args: &ubuntu18-args
BUILDKIT_INLINE_CACHE: "1"
ROOT_IMAGE: "nvcr.io/nvidia/cuda:11.7.1-devel-ubuntu18.04"
COMPILERS: "g++-5 g++-7 g++-6 clang-7"
ROOT_IMAGE: "nvcr.io/nvidia/cuda:11.8.0-devel-ubuntu18.04"
COMPILERS: "g++-5 g++-6 g++-7 clang-7"
deploy: *deploy-template

##### Not used yet
Expand Down Expand Up @@ -99,6 +99,19 @@ services:
args:
HOST_CXX: "g++-12"

clang-11:
extends:
service: ubuntu22.04
image: "libcudacxx/clang-11"
container_name: clang-11
profiles: ["clang-11"]
build:
context: ../../../
dockerfile: environments/linux/docker/ubuntu.base.Dockerfile
target: libcudacxx-configured
args:
HOST_CXX: "clang++-11"

clang-12:
extends:
service: ubuntu22.04
Expand All @@ -125,46 +138,46 @@ services:
args:
HOST_CXX: "clang++-13"

clang-11:
clang-14:
extends:
service: ubuntu22.04
image: "libcudacxx/clang-11"
container_name: clang-11
profiles: ["clang-11"]
image: "libcudacxx/clang-14"
container_name: clang-14
profiles: ["clang-14"]
build:
context: ../../../
dockerfile: environments/linux/docker/ubuntu.base.Dockerfile
target: libcudacxx-configured
args:
HOST_CXX: "clang++-11"
HOST_CXX: "clang++-14"

clang-14:
clang-15:
extends:
service: ubuntu22.04
image: "libcudacxx/clang-14"
container_name: clang-14
profiles: ["clang-14"]
image: "libcudacxx/clang-15"
container_name: clang-15
profiles: ["clang-15"]
build:
context: ../../../
dockerfile: environments/linux/docker/ubuntu.base.Dockerfile
target: libcudacxx-configured
args:
HOST_CXX: "clang++-14"
HOST_CXX: "clang++-15"

### Ubuntu 20.04 images:

gcc-10:
gcc-8:
extends:
service: ubuntu20.04
image: "libcudacxx/gcc-10"
container_name: gcc-10
profiles: ["gcc-10"]
image: "libcudacxx/gcc-8"
container_name: gcc-8
profiles: ["gcc-8"]
build:
context: ../../../
dockerfile: environments/linux/docker/ubuntu.base.Dockerfile
target: libcudacxx-configured
args:
HOST_CXX: "g++-10"
HOST_CXX: "g++-8"

gcc-9:
extends:
Expand All @@ -179,44 +192,44 @@ services:
args:
HOST_CXX: "g++-9"

gcc-8:
gcc-10:
extends:
service: ubuntu20.04
image: "libcudacxx/gcc-8"
container_name: gcc-8
profiles: ["gcc-8"]
image: "libcudacxx/gcc-10"
container_name: gcc-10
profiles: ["gcc-10"]
build:
context: ../../../
dockerfile: environments/linux/docker/ubuntu.base.Dockerfile
target: libcudacxx-configured
args:
HOST_CXX: "g++-8"
HOST_CXX: "g++-10"

clang-9:
clang-8:
extends:
service: ubuntu20.04
image: "libcudacxx/clang-9"
container_name: clang-9
profiles: ["clang-9"]
image: "libcudacxx/clang-8"
container_name: clang-8
profiles: ["clang-8"]
build:
context: ../../../
dockerfile: environments/linux/docker/ubuntu.base.Dockerfile
target: libcudacxx-configured
args:
HOST_CXX: "clang++-9"
HOST_CXX: "clang++-8"

clang-8:
clang-9:
extends:
service: ubuntu20.04
image: "libcudacxx/clang-8"
container_name: clang-8
profiles: ["clang-8"]
image: "libcudacxx/clang-9"
container_name: clang-9
profiles: ["clang-9"]
build:
context: ../../../
dockerfile: environments/linux/docker/ubuntu.base.Dockerfile
target: libcudacxx-configured
args:
HOST_CXX: "clang++-8"
HOST_CXX: "clang++-9"

clang-10:
extends:
Expand Down Expand Up @@ -247,31 +260,31 @@ services:
args:
HOST_CXX: "g++-5"

gcc-7:
gcc-6:
extends:
service: ubuntu18.04
image: "libcudacxx/gcc-7"
container_name: gcc-7
profiles: ["gcc-7"]
image: "libcudacxx/gcc-6"
container_name: gcc-6
profiles: ["gcc-6"]
build:
context: ../../../
dockerfile: environments/linux/docker/ubuntu.base.Dockerfile
target: libcudacxx-configured
args:
HOST_CXX: "g++-7"
HOST_CXX: "g++-6"

gcc-6:
gcc-7:
extends:
service: ubuntu18.04
image: "libcudacxx/gcc-6"
container_name: gcc-6
profiles: ["gcc-6"]
image: "libcudacxx/gcc-7"
container_name: gcc-7
profiles: ["gcc-7"]
build:
context: ../../../
dockerfile: environments/linux/docker/ubuntu.base.Dockerfile
target: libcudacxx-configured
args:
HOST_CXX: "g++-6"
HOST_CXX: "g++-7"

clang-7:
extends:
Expand Down
37 changes: 15 additions & 22 deletions environments/linux/docker/ubuntu.base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ ARG CMAKE_URL=https://github.com/Kitware/CMake/releases/download/v${CMAKE_VER}/c
ARG UBUNTU_TOOL_DEB_REPO=https://ppa.launchpadcontent.net/ubuntu-toolchain-r/ppa/ubuntu
ARG UBUNTU_TOOL_FINGER=60C317803A41BA51845E371A1E9377A2BA9EF27F

# `--silent --show-error` disables non-error output.
# `--fail` causes `curl` to return an error code on HTTP errors.
ARG CURL="curl --silent --show-error --fail"

ARG LLVM_INSTALLER=https://apt.llvm.org/llvm.sh
# `-y` answers yes to any interactive prompts.
# `-qq` because apt is noisy
ARG APT_GET="apt-get -y -qq"
Expand All @@ -30,37 +27,33 @@ ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1

SHELL ["/usr/bin/env", "bash", "-c"]

ADD ${LLVM_INSTALLER} /tmp/llvm.sh
ADD ${CMAKE_URL} /tmp/cmake.sh

# Install baseline development tools
RUN function comment() { :; }; \
comment "Sources for gcc"; \
source /etc/os-release; \
echo "deb ${UBUNTU_TOOL_DEB_REPO} ${VERSION_CODENAME} main" >> /etc/apt/sources.list.d/ubuntu-archive.list; \
echo "deb-src ${UBUNTU_TOOL_DEB_REPO} ${VERSION_CODENAME} main" >> /etc/apt/sources.list.d/ubuntu-archive.list; \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ${UBUNTU_TOOL_FINGER}; \
${APT_GET} update;

RUN function comment() { :; }; \
comment "Install compilers: ${COMPILERS}"; \
${APT_GET} install gcc g++ gcc-multilib g++-multilib ${COMPILERS};

# `--no-install-recommends` avoids unnecessary packages, keeping the image smaller.
RUN function comment() { :; }; \
${APT_GET} update; \
comment "Install basic build tools"; \
${APT_GET} --no-install-recommends install apt-utils curl git zip unzip tar sudo make \
ninja-build ccache pkg-config python3 python3-wheel python3-pip;

ADD ${CMAKE_URL} /tmp/cmake.sh

RUN function comment() { :; }; \
${APT_GET} --no-install-recommends install apt-utils curl wget git zip unzip tar \
sudo make software-properties-common ninja-build ccache pkg-config \
python3 python3-wheel python3-pip; \
comment "Install GCC and Clang"; \
# Unattended installation hack
echo "\n" | bash /tmp/llvm.sh all; \
${APT_GET} install gcc g++ ${COMPILERS}; \
comment "Install CMake"; \
sh /tmp/cmake.sh --skip-license --prefix=/usr;

RUN function comment() { :; }; \
sh /tmp/cmake.sh --skip-license --prefix=/usr; \
comment "Install Python utils"; \
update-alternatives --quiet --install /usr/bin/python python $(which python3) 3; \
update-alternatives --quiet --set python $(which python3); \
python3 -m pip install setuptools wheel; \
python3 -m pip install lit;
python3 -m pip install lit; \
rm -rf /var/lib/apt/lists/*

# Assemble libcudacxx specific bits
FROM devenv AS libcudacxx-configured
Expand Down