mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-19 02:25:42 +00:00
Add dockerfiles to be used by VTK-m Gitlab ci
This commit is contained in:
parent
b16e4fc17b
commit
36d1a2d6ae
32
.gitlab/ci/README.md
Normal file
32
.gitlab/ci/README.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# CI Docker images
|
||||||
|
|
||||||
|
These images build base images for use in the CI infrastructure.
|
||||||
|
|
||||||
|
## Adding or Updating images
|
||||||
|
|
||||||
|
Adding/Updating an image to be used for CI infrastructure requires the following process.
|
||||||
|
|
||||||
|
1. Start a new git branch
|
||||||
|
2. Update the associated `Dockerfile`
|
||||||
|
3. Locally build and verify the docker image
|
||||||
|
4.
|
||||||
|
4. Push the docker image to dockerhub
|
||||||
|
5. Open a Merge Request to
|
||||||
|
|
||||||
|
|
||||||
|
### Manual building
|
||||||
|
|
||||||
|
After updating the `Dockerfile` (and associated scripts), it's a standard image
|
||||||
|
build sequence:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd $name
|
||||||
|
docker build -t kitware/vtkm/ci-vtkm-$name-$YYMMDD .
|
||||||
|
docker push kitware/vtkm/ci-vtkm-$name-$YYMMDD
|
||||||
|
```
|
||||||
|
|
||||||
|
For example to rebuild the `rhe8` `cuda10.2` image we would issue:
|
||||||
|
```sh
|
||||||
|
sudo docker build -t kitware/vtkm/ci-vtkm-rhe8-cuda10.2-$YYMMDD .
|
||||||
|
sudo docker build -t kitware/vtkm/ci-vtkm-rhe8-cuda10.2-$YYMMDD .
|
||||||
|
```
|
21
.gitlab/ci/docker/centos7/cuda10.2/Dockerfile
Normal file
21
.gitlab/ci/docker/centos7/cuda10.2/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
FROM nvidia/cuda:10.2-devel-centos7
|
||||||
|
LABEL maintainer "Robert Maynard<robert.maynard@kitware.com>"
|
||||||
|
|
||||||
|
RUN yum install cmake make gcc gcc-c++ -y
|
||||||
|
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | bash
|
||||||
|
RUN yum install git git-lfs -y
|
||||||
|
|
||||||
|
# Provide a consistent CMake path across all images
|
||||||
|
# Install CMake 3.13 as it is the minium for cuda builds
|
||||||
|
RUN mkdir /opt/cmake && \
|
||||||
|
curl -L https://github.com/Kitware/CMake/releases/download/v3.13.5/cmake-3.13.5-Linux-x86_64.sh > cmake-3.13.5-Linux-x86_64.sh && \
|
||||||
|
sh cmake-3.13.5-Linux-x86_64.sh --prefix=/opt/cmake/ --exclude-subdir --skip-license
|
||||||
|
|
||||||
|
# Provide CMake 3.17 so we can re-run tests easily
|
||||||
|
# This will be used when we run just the tests
|
||||||
|
RUN mkdir /opt/cmake-latest/ && \
|
||||||
|
curl -L https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0-Linux-x86_64.sh > cmake-3.17.0-Linux-x86_64.sh && \
|
||||||
|
sh cmake-3.17.0-Linux-x86_64.sh --prefix=/opt/cmake-latest/ --exclude-subdir --skip-license && \
|
||||||
|
ln -s /opt/cmake-latest/bin/ctest /opt/cmake-latest/bin/ctest-latest
|
||||||
|
|
||||||
|
ENV PATH "/opt/cmake/bin:/opt/cmake-latest/bin:${PATH}"
|
18
.gitlab/ci/docker/rhel8/cuda10.2/Dockerfile
Normal file
18
.gitlab/ci/docker/rhel8/cuda10.2/Dockerfile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
FROM nvidia/cuda:10.2-devel-ubi8
|
||||||
|
LABEL maintainer "Robert Maynard<robert.maynard@kitware.com>"
|
||||||
|
|
||||||
|
RUN yum install cmake make gcc gcc-c++ curl -y
|
||||||
|
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | bash
|
||||||
|
RUN yum install git git-lfs -y
|
||||||
|
|
||||||
|
# Provide a consistent CMake path across all images
|
||||||
|
RUN mkdir -p /opt/cmake/bin && ln -s /usr/bin/cmake /opt/cmake/bin/cmake
|
||||||
|
|
||||||
|
# Provide CMake 3.17 so we can re-run tests easily
|
||||||
|
# This will be used when we run just the tests
|
||||||
|
RUN mkdir /opt/cmake-latest/ && \
|
||||||
|
curl -L https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0-Linux-x86_64.sh > cmake-3.17.0-Linux-x86_64.sh && \
|
||||||
|
sh cmake-3.17.0-Linux-x86_64.sh --prefix=/opt/cmake-latest/ --exclude-subdir --skip-license && \
|
||||||
|
ln -s /opt/cmake-latest/bin/ctest /opt/cmake-latest/bin/ctest-latest
|
||||||
|
|
||||||
|
ENV PATH "/opt/cmake/bin:/opt/cmake-latest/bin:${PATH}"
|
51
.gitlab/ci/docker/ubuntu1604/base/Dockerfile
Normal file
51
.gitlab/ci/docker/ubuntu1604/base/Dockerfile
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
FROM ubuntu:16.04
|
||||||
|
LABEL maintainer "Robert Maynard<robert.maynard@kitware.com>"
|
||||||
|
|
||||||
|
# Base dependencies for building VTK-m projects
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
autotools-dev \
|
||||||
|
clang-3.8 \
|
||||||
|
clang-5.0 \
|
||||||
|
curl \
|
||||||
|
g++ \
|
||||||
|
g++-4.8 \
|
||||||
|
libtbb-dev \
|
||||||
|
make \
|
||||||
|
ninja-build \
|
||||||
|
software-properties-common \
|
||||||
|
ssh
|
||||||
|
|
||||||
|
# extra dependencies for dejagore machine
|
||||||
|
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
|
||||||
|
RUN apt-get install -y --no-install-recommends \
|
||||||
|
git \
|
||||||
|
git-lfs \
|
||||||
|
&& \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Provide a modern OpenMPI verion that supports
|
||||||
|
# running as root via environment variables
|
||||||
|
RUN mkdir /opt/openmpi && \
|
||||||
|
curl -L https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.3.tar.gz > openmpi-4.0.3.tar.gz && \
|
||||||
|
tar -xf openmpi-4.0.3.tar.gz && \
|
||||||
|
cd openmpi-4.0.3 && \
|
||||||
|
./configure --prefix=/opt/openmpi && \
|
||||||
|
make -j all && \
|
||||||
|
make install
|
||||||
|
|
||||||
|
# Provide a consistent CMake path across all images
|
||||||
|
# Install CMake 3.8 as it is the minium for non-cuda builds
|
||||||
|
RUN mkdir /opt/cmake && \
|
||||||
|
curl -L https://github.com/Kitware/CMake/releases/download/v3.8.2/cmake-3.8.2-Linux-x86_64.sh > cmake-3.8.2-Linux-x86_64.sh && \
|
||||||
|
sh cmake-3.8.2-Linux-x86_64.sh --prefix=/opt/cmake/ --exclude-subdir --skip-license
|
||||||
|
|
||||||
|
# Provide CMake 3.17 so we can re-run tests easily
|
||||||
|
# This will be used when we run just the tests
|
||||||
|
RUN mkdir /opt/cmake-latest/ && \
|
||||||
|
curl -L https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0-Linux-x86_64.sh > cmake-3.17.0-Linux-x86_64.sh && \
|
||||||
|
sh cmake-3.17.0-Linux-x86_64.sh --prefix=/opt/cmake-latest/ --exclude-subdir --skip-license && \
|
||||||
|
ln -s /opt/cmake-latest/bin/ctest /opt/cmake-latest/bin/ctest-latest
|
||||||
|
|
||||||
|
ENV PATH "/opt/cmake/bin:/opt/cmake-latest/bin:${PATH}"
|
49
.gitlab/ci/docker/ubuntu1604/cuda9.2/Dockerfile
Normal file
49
.gitlab/ci/docker/ubuntu1604/cuda9.2/Dockerfile
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
FROM nvidia/cuda:9.2-devel-ubuntu16.04
|
||||||
|
LABEL maintainer "Robert Maynard<robert.maynard@kitware.com>"
|
||||||
|
|
||||||
|
# Base dependencies for building VTK-m projects
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
autotools-dev \
|
||||||
|
curl \
|
||||||
|
g++ \
|
||||||
|
libomp-dev \
|
||||||
|
libtbb-dev \
|
||||||
|
make \
|
||||||
|
ninja-build \
|
||||||
|
software-properties-common \
|
||||||
|
ssh
|
||||||
|
|
||||||
|
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
git \
|
||||||
|
git-lfs \
|
||||||
|
&& \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Provide a modern OpenMPI verion that supports
|
||||||
|
# running as root via environment variables
|
||||||
|
RUN mkdir /opt/openmpi && \
|
||||||
|
curl -L https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.3.tar.gz > openmpi-4.0.3.tar.gz && \
|
||||||
|
tar -xf openmpi-4.0.3.tar.gz && \
|
||||||
|
cd openmpi-4.0.3 && \
|
||||||
|
./configure --prefix=/opt/openmpi && \
|
||||||
|
make -j all && \
|
||||||
|
make install
|
||||||
|
|
||||||
|
# Provide a consistent CMake path across all images
|
||||||
|
# Allow tests that require CMake to work correctly
|
||||||
|
# Install CMake 3.13 as it is the minium for cuda builds
|
||||||
|
RUN mkdir /opt/cmake && \
|
||||||
|
curl -L https://github.com/Kitware/CMake/releases/download/v3.13.5/cmake-3.13.5-Linux-x86_64.sh > cmake-3.13.5-Linux-x86_64.sh && \
|
||||||
|
sh cmake-3.13.5-Linux-x86_64.sh --prefix=/opt/cmake/ --exclude-subdir --skip-license
|
||||||
|
|
||||||
|
# Provide CMake 3.17 so we can re-run tests easily
|
||||||
|
# This will be used when we run just the tests
|
||||||
|
RUN mkdir /opt/cmake-latest/ && \
|
||||||
|
curl -L https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0-Linux-x86_64.sh > cmake-3.17.0-Linux-x86_64.sh && \
|
||||||
|
sh cmake-3.17.0-Linux-x86_64.sh --prefix=/opt/cmake-latest/ --exclude-subdir --skip-license && \
|
||||||
|
ln -s /opt/cmake-latest/bin/ctest /opt/cmake-latest/bin/ctest-latest
|
||||||
|
|
||||||
|
ENV PATH "/opt/cmake/bin:/opt/cmake-latest/bin:${PATH}"
|
43
.gitlab/ci/docker/ubuntu1804/base/Dockerfile
Normal file
43
.gitlab/ci/docker/ubuntu1804/base/Dockerfile
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
FROM ubuntu:18.04
|
||||||
|
LABEL maintainer "Robert Maynard<robert.maynard@kitware.com>"
|
||||||
|
|
||||||
|
# Base dependencies for building VTK-m projects
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
cmake \
|
||||||
|
curl \
|
||||||
|
g++ \
|
||||||
|
git \
|
||||||
|
git-lfs \
|
||||||
|
libmpich-dev \
|
||||||
|
libomp-dev \
|
||||||
|
libtbb-dev \
|
||||||
|
mpich \
|
||||||
|
ninja-build \
|
||||||
|
software-properties-common
|
||||||
|
|
||||||
|
# extra dependencies for charm machine
|
||||||
|
RUN add-apt-repository ppa:jonathonf/gcc-9.2
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
clang-8 \
|
||||||
|
g++-9 \
|
||||||
|
&& \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Need to run git-lfs install manually on ubuntu based images when using the
|
||||||
|
# system packaged version
|
||||||
|
RUN git-lfs install
|
||||||
|
|
||||||
|
# Provide a consistent CMake path across all images
|
||||||
|
# Allow tests that require CMake to work correctly
|
||||||
|
RUN mkdir /opt/cmake && \
|
||||||
|
curl -L https://github.com/Kitware/CMake/releases/download/v3.16.4/cmake-3.16.4-Linux-x86_64.sh > cmake-3.16.4-Linux-x86_64.sh && \
|
||||||
|
sh cmake-3.16.4-Linux-x86_64.sh --prefix=/opt/cmake/ --exclude-subdir --skip-license
|
||||||
|
|
||||||
|
# Provide CMake 3.17 so we can re-run tests easily
|
||||||
|
# This will be used when we run just the tests
|
||||||
|
RUN mkdir /opt/cmake-latest/ && \
|
||||||
|
curl -L https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0-Linux-x86_64.sh > cmake-3.17.0-Linux-x86_64.sh && \
|
||||||
|
sh cmake-3.17.0-Linux-x86_64.sh --prefix=/opt/cmake-latest/ --exclude-subdir --skip-license && \
|
||||||
|
ln -s /opt/cmake-latest/bin/ctest /opt/cmake-latest/bin/ctest-latest
|
||||||
|
|
||||||
|
ENV PATH "/opt/cmake/bin:/opt/cmake-latest/bin:${PATH}"
|
35
.gitlab/ci/docker/ubuntu1804/cuda10.1/Dockerfile
Normal file
35
.gitlab/ci/docker/ubuntu1804/cuda10.1/Dockerfile
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
FROM nvidia/cuda:10.1-devel-ubuntu18.04
|
||||||
|
LABEL maintainer "Robert Maynard<robert.maynard@kitware.com>"
|
||||||
|
|
||||||
|
# Base dependencies for building VTK-m projects
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
curl \
|
||||||
|
g++ \
|
||||||
|
git \
|
||||||
|
git-lfs \
|
||||||
|
libmpich-dev \
|
||||||
|
libomp-dev \
|
||||||
|
libtbb-dev \
|
||||||
|
mpich \
|
||||||
|
ninja-build \
|
||||||
|
&& \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Need to run git-lfs install manually on ubuntu based images when using the
|
||||||
|
# system packaged version
|
||||||
|
RUN git-lfs install
|
||||||
|
|
||||||
|
# Provide a consistent CMake path across all images
|
||||||
|
# Allow tests that require CMake to work correctly
|
||||||
|
RUN mkdir /opt/cmake && \
|
||||||
|
curl -L https://github.com/Kitware/CMake/releases/download/v3.16.4/cmake-3.16.4-Linux-x86_64.sh > cmake-3.16.4-Linux-x86_64.sh && \
|
||||||
|
sh cmake-3.16.4-Linux-x86_64.sh --prefix=/opt/cmake/ --exclude-subdir --skip-license
|
||||||
|
|
||||||
|
# Provide CMake 3.17 so we can re-run tests easily
|
||||||
|
# This will be used when we run just the tests
|
||||||
|
RUN mkdir /opt/cmake-latest/ && \
|
||||||
|
curl -L https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0-Linux-x86_64.sh > cmake-3.17.0-Linux-x86_64.sh && \
|
||||||
|
sh cmake-3.17.0-Linux-x86_64.sh --prefix=/opt/cmake-latest/ --exclude-subdir --skip-license && \
|
||||||
|
ln -s /opt/cmake-latest/bin/ctest /opt/cmake-latest/bin/ctest-latest
|
||||||
|
|
||||||
|
ENV PATH "/opt/cmake/bin:/opt/cmake-latest/bin:${PATH}"
|
35
.gitlab/ci/docker/update_all.sh
Executable file
35
.gitlab/ci/docker/update_all.sh
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
# data is expected to be a string of the form YYYYMMDD
|
||||||
|
readonly date="$1"
|
||||||
|
|
||||||
|
cd centos7/cuda10.2
|
||||||
|
sudo docker build -t kitware/vtkm:ci-centos7_cuda10.2-$date .
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
cd rhel8/cuda10.2
|
||||||
|
sudo docker build -t kitware/vtkm:ci-rhel8_cuda10.2-$date .
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
cd ubuntu1604/base
|
||||||
|
sudo docker build -t kitware/vtkm:ci-ubuntu1604-$date .
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
cd ubuntu1604/cuda9.2
|
||||||
|
sudo docker build -t kitware/vtkm:ci-ubuntu1604_cuda9.2-$date .
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
cd ubuntu1804/base
|
||||||
|
sudo docker build -t kitware/vtkm:ci-ubuntu1804-$date .
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
cd ubuntu1804/cuda10.1
|
||||||
|
sudo docker build -t kitware/vtkm:ci-ubuntu1804_cuda10.1-$date .
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
# sudo docker login --username=<docker_hub_name>
|
||||||
|
sudo docker push kitware/vtkm
|
||||||
|
sudo docker system prune
|
Loading…
Reference in New Issue
Block a user