Skip to content
Snippets Groups Projects
Commit b5bed611 authored by Lars Bilke's avatar Lars Bilke
Browse files

Merge branch 'ci-mpi-container' into 'master'

[ci] Build openmpi container.

See merge request ogs/ogs!3044
parents 0a99afc7 b6f36e7d
No related branches found
No related tags found
No related merge requests found
Subproject commit ce680211cf5563e2bfac11d6251269d5e1cae463
Subproject commit eb93601e0b2ce3bb72cee935062624c73f7432aa
jobs:
- job: Windows
pool:
vmImage: 'windows-2019'
timeoutInMinutes: 120
variables:
NUM_THREADS: 2
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
- script: |
git lfs install
git lfs fetch
git lfs checkout
pip install conan --upgrade
conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
conan install ninja_installer/1.8.2_kitware@bincrafters/stable -r bincrafters -g=virtualenv
call activate.bat
mkdir build
cd build
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\vsdevcmd" -arch=x64
cmake .. -G Ninja -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF -DOGS_EIGEN_DYNAMIC_SHAPE_MATRICES=ON
ninja -j 2
ninja -j 2 tests
......@@ -9,9 +9,6 @@
CCACHE_DIR: "$CI_PROJECT_DIR/.ccache"
before_script:
- git lfs install
- git lfs fetch
- git lfs checkout
- mkdir -p $BUILD_DIR
- cd $BUILD_DIR
- ([ "${CONAN_USER_HOME}" == "${CI_PROJECT_DIR}/.conan" ]) && conan remove --system-reqs '*'
......
container:
stage: package
only:
refs:
- master
tags:
- docker-shell
tags: [docker-shell]
needs: [meta]
variables:
OPENMPI_VERSIONS: 'off' # 4.0.1
extends:
- .container-maker-setup
- .rules-master
script:
- python ThirdParty/container-maker/ogscm/cli.py -B -C -R --ogs . --pm system --cvode --ompi $OPENMPI_VERSIONS
- python ThirdParty/container-maker/ogscm/cli.py -B -C -R --ogs . --pm system --cvode
- python ThirdParty/container-maker/ogscm/cli.py -B -C -R --ogs . --pm system --cvode --ompi 4.0.4 --base_image centos:8
artifacts:
name: container
paths:
......
......@@ -13,9 +13,6 @@ tests large:
image:
name: $CONTAINER_GCC_IMAGE
script:
- git lfs install
- git lfs fetch
- git lfs checkout
- mkdir -p $BUILD_DIR
- cd $BUILD_DIR
- >
......
# syntax=docker/dockerfile:experimental
FROM ubuntu:18.04 AS build
# Generated with ogs-container-maker 1.4.3
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
curl \
make \
tar \
wget && \
rm -rf /var/lib/apt/lists/*
# LLVM compiler
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
clang-9 \
clang-format-9 \
clang-tidy-9 \
libomp-dev && \
rm -rf /var/lib/apt/lists/*
RUN update-alternatives --install /usr/bin/clang clang $(which clang-9) 30 && \
update-alternatives --install /usr/bin/clang++ clang++ $(which clang++-9) 30 && \
update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-9) 30 && \
update-alternatives --install /usr/bin/clang-tidy clang-tidy $(which clang-tidy-9) 30
# pip
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip \
python3-setuptools \
python3-wheel && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install scif
# OGS base building block
# Python
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3 \
python3-dev && \
rm -rf /var/lib/apt/lists/*
# pip
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip \
python3-setuptools \
python3-wheel && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install virtualenv pre-commit cmake-format
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends software-properties-common && \
apt-add-repository ppa:git-core/ppa -y && \
apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
git \
git-lfs \
ninja-build && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get install -y dirmngr --install-recommends && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6B05F25D762E3157 && \
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
git lfs install && \
mkdir -p /apps /scratch /lustre /work /projects /data
# CMake version 3.16.6
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
make \
wget && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.16/cmake-3.16.6-Linux-x86_64.sh && \
mkdir -p /usr/local && \
/bin/sh /var/tmp/cmake-3.16.6-Linux-x86_64.sh --prefix=/usr/local --skip-license && \
rm -rf /var/tmp/cmake-3.16.6-Linux-x86_64.sh
ENV PATH=/usr/local/bin:$PATH
# Package manager Conan building block
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
pkg-config && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
autoconf-archive \
libtool && \
rm -rf /var/lib/apt/lists/*
# pip
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip \
python3-setuptools \
python3-wheel && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install conan==1.22.2
RUN mkdir -p /opt/conan && \
chmod 777 /opt/conan
ENV CONAN_USER_HOME=/opt/conan
LABEL org.opengeosys.pm=conan \
org.opengeosys.pm.conan.version=1.22.2
LABEL org.opengeosys.pm.conan.user_home=/opt/conan
# Include-what-you-use for clang version 9
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libclang-9-dev \
libncurses5-dev \
llvm-9-dev \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/*
# https://github.com/include-what-you-use/include-what-you-use/archive/clang_9.0.tar.gz
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/include-what-you-use/include-what-you-use/archive/clang_9.0.tar.gz && \
mkdir -p /var/tmp && tar -x -f /var/tmp/clang_9.0.tar.gz -C /var/tmp -z && \
mkdir -p /var/tmp/include-what-you-use-clang_9.0/build && cd /var/tmp/include-what-you-use-clang_9.0/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local/iwyy -D IWYU_LLVM_ROOT_PATH=/usr/lib/llvm-9 /var/tmp/include-what-you-use-clang_9.0 && \
cmake --build /var/tmp/include-what-you-use-clang_9.0/build --target all -- -j$(nproc) && \
cmake --build /var/tmp/include-what-you-use-clang_9.0/build --target install -- -j$(nproc) && \
rm -rf /var/tmp/include-what-you-use-clang_9.0 /var/tmp/clang_9.0.tar.gz
ENV PATH=/usr/local/iwyy/bin:$PATH
# ccache building block
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ccache && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /opt/ccache && chmod 777 /opt/ccache
ENV CCACHE_DIR=/opt/ccache \
CCACHE_MAXSIZE=15G \
CCACHE_SLOPPINESS=pch_defines,time_macros
LABEL ccache.dir=/opt/ccache \
ccache.size=15G
# Jenkins node
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
openssh-client \
rsync \
sudo && \
rm -rf /var/lib/apt/lists/*
RUN groupadd --gid 1001 jenkins || true && \
adduser --uid 500 --gid 1001 --disabled-password --gecos "" jenkins && \
echo "jenkins ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
echo "jenkins:jenkins" | chpasswd
USER jenkins
WORKDIR /home/jenkins
# syntax=docker/dockerfile:experimental
FROM ubuntu:20.04 AS build
# Generated with ogs-container-maker 1.4.3
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
curl \
make \
tar \
wget && \
rm -rf /var/lib/apt/lists/*
# LLVM compiler
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
clang-9 \
clang-format-9 \
clang-tidy-9 \
libomp-dev && \
rm -rf /var/lib/apt/lists/*
RUN update-alternatives --install /usr/bin/clang clang $(which clang-9) 30 && \
update-alternatives --install /usr/bin/clang++ clang++ $(which clang++-9) 30 && \
update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-9) 30 && \
update-alternatives --install /usr/bin/clang-tidy clang-tidy $(which clang-tidy-9) 30
# pip
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip \
python3-setuptools \
python3-wheel && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install scif
# OGS base building block
# Python
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3 \
python3-dev && \
rm -rf /var/lib/apt/lists/*
# pip
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip \
python3-setuptools \
python3-wheel && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install virtualenv pre-commit cmake-format
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends software-properties-common && \
apt-add-repository ppa:git-core/ppa -y && \
apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
git \
git-lfs \
ninja-build && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get install -y dirmngr --install-recommends && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6B05F25D762E3157 && \
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
git lfs install && \
mkdir -p /apps /scratch /lustre /work /projects /data
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libgl1-mesa-dev \
libglu1-mesa-dev \
libxt-dev \
mesa-common-dev && \
rm -rf /var/lib/apt/lists/*
# CMake version 3.16.6
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
make \
wget && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.16/cmake-3.16.6-Linux-x86_64.sh && \
mkdir -p /usr/local && \
/bin/sh /var/tmp/cmake-3.16.6-Linux-x86_64.sh --prefix=/usr/local --skip-license && \
rm -rf /var/tmp/cmake-3.16.6-Linux-x86_64.sh
ENV PATH=/usr/local/bin:$PATH
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libboost-dev && \
rm -rf /var/lib/apt/lists/*
# Eigen version 3.3.4
# http://bitbucket.org/eigen/eigen/get/3.3.4.tar.gz
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp http://bitbucket.org/eigen/eigen/get/3.3.4.tar.gz && \
mkdir -p /var/tmp && tar -x -f /var/tmp/3.3.4.tar.gz -C /var/tmp -z && \
mkdir -p /var/tmp/eigen-eigen-*/build && cd /var/tmp/eigen-eigen-*/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local/eigen /var/tmp/eigen-eigen-* && \
cmake --build /var/tmp/eigen-eigen-*/build --target all -- -j$(nproc) && \
cmake --build /var/tmp/eigen-eigen-*/build --target install -- -j$(nproc) && \
rm -rf /var/tmp/eigen-eigen-* /var/tmp/3.3.4.tar.gz
ENV Eigen3_DIR=/usr/local/eigen \
Eigen3_ROOT=/usr/local/eigen
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libgeotiff-dev \
libqt5x11extras5-dev \
libqt5xmlpatterns5-dev \
libshp-dev \
qt5-default && \
rm -rf /var/lib/apt/lists/*
# VTK 8.2.0
# https://www.vtk.org/files/release/8.2/VTK-8.2.0.tar.gz
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://www.vtk.org/files/release/8.2/VTK-8.2.0.tar.gz && \
mkdir -p /var/tmp && tar -x -f /var/tmp/VTK-8.2.0.tar.gz -C /var/tmp -z && \
mkdir -p /var/tmp/VTK-8.2.0/build && cd /var/tmp/VTK-8.2.0/build && CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/vtk -DVTK_BUILD_QT_DESIGNER_PLUGIN=OFF -DVTK_Group_Qt=ON -DVTK_QT_VERSION=5 -D CMAKE_BUILD_TYPE=Release /var/tmp/VTK-8.2.0 && \
cmake --build /var/tmp/VTK-8.2.0/build --target all -- -j$(nproc) && \
cmake --build /var/tmp/VTK-8.2.0/build --target install -- -j$(nproc) && \
rm -rf /var/tmp/VTK-8.2.0 /var/tmp/VTK-8.2.0.tar.gz
RUN echo "/usr/local/vtk/lib" >> /etc/ld.so.conf.d/hpccm.conf && ldconfig
ENV VTK_ROOT=/usr/local/vtk
# Include-what-you-use for clang version 9
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libclang-9-dev \
libncurses5-dev \
llvm-9-dev \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/*
# https://github.com/include-what-you-use/include-what-you-use/archive/clang_9.0.tar.gz
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/include-what-you-use/include-what-you-use/archive/clang_9.0.tar.gz && \
mkdir -p /var/tmp && tar -x -f /var/tmp/clang_9.0.tar.gz -C /var/tmp -z && \
mkdir -p /var/tmp/include-what-you-use-clang_9.0/build && cd /var/tmp/include-what-you-use-clang_9.0/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local/iwyy -D IWYU_LLVM_ROOT_PATH=/usr/lib/llvm-9 /var/tmp/include-what-you-use-clang_9.0 && \
cmake --build /var/tmp/include-what-you-use-clang_9.0/build --target all -- -j$(nproc) && \
cmake --build /var/tmp/include-what-you-use-clang_9.0/build --target install -- -j$(nproc) && \
rm -rf /var/tmp/include-what-you-use-clang_9.0 /var/tmp/clang_9.0.tar.gz
ENV PATH=/usr/local/iwyy/bin:$PATH
# ccache building block
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ccache && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /opt/ccache && chmod 777 /opt/ccache
ENV CCACHE_DIR=/opt/ccache \
CCACHE_MAXSIZE=15G \
CCACHE_SLOPPINESS=pch_defines,time_macros
LABEL ccache.dir=/opt/ccache \
ccache.size=15G
# Jenkins node
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
openssh-client \
rsync \
sudo && \
rm -rf /var/lib/apt/lists/*
RUN groupadd --gid 1001 jenkins || true && \
adduser --uid 500 --gid 1001 --disabled-password --gecos "" jenkins && \
echo "jenkins ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
echo "jenkins:jenkins" | chpasswd
USER jenkins
WORKDIR /home/jenkins
# syntax=docker/dockerfile:experimental
FROM ubuntu:19.10 AS build
# Generated with ogs-container-maker 1.4.3
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
curl \
make \
tar \
wget && \
rm -rf /var/lib/apt/lists/*
# GNU compiler
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
g++ \
gcc && \
rm -rf /var/lib/apt/lists/*
# pip
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip \
python3-setuptools \
python3-wheel && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install scif
# OGS base building block
# Python
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3 \
python3-dev && \
rm -rf /var/lib/apt/lists/*
# pip
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip \
python3-setuptools \
python3-wheel && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install virtualenv pre-commit cmake-format
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends software-properties-common && \
apt-add-repository ppa:git-core/ppa -y && \
apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
git \
git-lfs \
ninja-build && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get install -y dirmngr --install-recommends && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6B05F25D762E3157 && \
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
git lfs install && \
mkdir -p /apps /scratch /lustre /work /projects /data
# CMake version 3.16.6
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
make \
wget && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.16/cmake-3.16.6-Linux-x86_64.sh && \
mkdir -p /usr/local && \
/bin/sh /var/tmp/cmake-3.16.6-Linux-x86_64.sh --prefix=/usr/local --skip-license && \
rm -rf /var/tmp/cmake-3.16.6-Linux-x86_64.sh
ENV PATH=/usr/local/bin:$PATH
# Package manager Conan building block
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
pkg-config && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
autoconf-archive \
libtool && \
rm -rf /var/lib/apt/lists/*
# pip
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip \
python3-setuptools \
python3-wheel && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install conan==1.22.2
RUN mkdir -p /opt/conan && \
chmod 777 /opt/conan
ENV CONAN_USER_HOME=/opt/conan
LABEL org.opengeosys.pm=conan \
org.opengeosys.pm.conan.version=1.22.2
LABEL org.opengeosys.pm.conan.user_home=/opt/conan
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
doxygen \
graphviz \
texlive-base && \
rm -rf /var/lib/apt/lists/*
# pip
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip \
python3-setuptools \
python3-wheel && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install gcovr
# ccache building block
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ccache && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /opt/ccache && chmod 777 /opt/ccache
ENV CCACHE_DIR=/opt/ccache \
CCACHE_MAXSIZE=15G \
CCACHE_SLOPPINESS=pch_defines,time_macros
LABEL ccache.dir=/opt/ccache \
ccache.size=15G
# Jenkins node
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
openssh-client \
rsync \
sudo && \
rm -rf /var/lib/apt/lists/*
RUN groupadd --gid 1001 jenkins || true && \
adduser --uid 500 --gid 1001 --disabled-password --gecos "" jenkins && \
echo "jenkins ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
echo "jenkins:jenkins" | chpasswd
USER jenkins
WORKDIR /home/jenkins
# syntax=docker/dockerfile:experimental
FROM ubuntu:19.10 AS build
# Generated with ogs-container-maker 1.4.3
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
curl \
make \
tar \
wget && \
rm -rf /var/lib/apt/lists/*
# GNU compiler
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
g++ \
gcc && \
rm -rf /var/lib/apt/lists/*
# pip
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip \
python3-setuptools \
python3-wheel && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install scif
# OGS base building block
# Python
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3 \
python3-dev && \
rm -rf /var/lib/apt/lists/*
# pip
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip \
python3-setuptools \
python3-wheel && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install virtualenv pre-commit cmake-format
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends software-properties-common && \
apt-add-repository ppa:git-core/ppa -y && \
apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
git \
git-lfs \
ninja-build && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get install -y dirmngr --install-recommends && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6B05F25D762E3157 && \
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
git lfs install && \
mkdir -p /apps /scratch /lustre /work /projects /data
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libgl1-mesa-dev \
libglu1-mesa-dev \
libxt-dev \
mesa-common-dev && \
rm -rf /var/lib/apt/lists/*
# CMake version 3.16.6
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
make \
wget && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.16/cmake-3.16.6-Linux-x86_64.sh && \
mkdir -p /usr/local && \
/bin/sh /var/tmp/cmake-3.16.6-Linux-x86_64.sh --prefix=/usr/local --skip-license && \
rm -rf /var/tmp/cmake-3.16.6-Linux-x86_64.sh
ENV PATH=/usr/local/bin:$PATH
# Package manager Conan building block
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
pkg-config && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
autoconf-archive \
libtool && \
rm -rf /var/lib/apt/lists/*
# pip
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip \
python3-setuptools \
python3-wheel && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install conan==1.22.2
RUN mkdir -p /opt/conan && \
chmod 777 /opt/conan
ENV CONAN_USER_HOME=/opt/conan
LABEL org.opengeosys.pm=conan \
org.opengeosys.pm.conan.version=1.22.2
LABEL org.opengeosys.pm.conan.user_home=/opt/conan
# CVode version 2.8.2
# https://github.com/ufz/cvode/archive/2.8.2.tar.gz
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/ufz/cvode/archive/2.8.2.tar.gz && \
mkdir -p /var/tmp && tar -x -f /var/tmp/2.8.2.tar.gz -C /var/tmp -z && \
mkdir -p /var/tmp/cvode-2.8.2/build && cd /var/tmp/cvode-2.8.2/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local/cvode -D CMAKE_INSTALL_PREFIX=/usr/local/cvode -D EXAMPLES_INSTALL=OFF -D BUILD_SHARED_LIBS=OFF -D CMAKE_POSITION_INDEPENDENT_CODE=ON /var/tmp/cvode-2.8.2 && \
cmake --build /var/tmp/cvode-2.8.2/build --target all -- -j$(nproc) && \
cmake --build /var/tmp/cvode-2.8.2/build --target install -- -j$(nproc) && \
rm -rf /var/tmp/cvode-2.8.2 /var/tmp/2.8.2.tar.gz
ENV CVODE_ROOT=/usr/local/cvode
# cppcheck version 809a769c690d8ab6fef293e41a29c8490512866e
# https://github.com/danmar/cppcheck/archive/809a769c690d8ab6fef293e41a29c8490512866e.tar.gz
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/danmar/cppcheck/archive/809a769c690d8ab6fef293e41a29c8490512866e.tar.gz && \
mkdir -p /var/tmp && tar -x -f /var/tmp/809a769c690d8ab6fef293e41a29c8490512866e.tar.gz -C /var/tmp -z && \
mkdir -p /var/tmp/cppcheck-809a769c690d8ab6fef293e41a29c8490512866e/build && cd /var/tmp/cppcheck-809a769c690d8ab6fef293e41a29c8490512866e/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local/cppcheck -D CMAKE_BUILD_TYPE=Release /var/tmp/cppcheck-809a769c690d8ab6fef293e41a29c8490512866e && \
cmake --build /var/tmp/cppcheck-809a769c690d8ab6fef293e41a29c8490512866e/build --target all -- -j$(nproc) && \
cmake --build /var/tmp/cppcheck-809a769c690d8ab6fef293e41a29c8490512866e/build --target install -- -j$(nproc) && \
rm -rf /var/tmp/cppcheck-809a769c690d8ab6fef293e41a29c8490512866e /var/tmp/809a769c690d8ab6fef293e41a29c8490512866e.tar.gz
ENV PATH=/usr/local/cppcheck/bin:$PATH
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
doxygen \
graphviz \
texlive-base && \
rm -rf /var/lib/apt/lists/*
# pip
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip \
python3-setuptools \
python3-wheel && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install gcovr
# ccache building block
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ccache && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /opt/ccache && chmod 777 /opt/ccache
ENV CCACHE_DIR=/opt/ccache \
CCACHE_MAXSIZE=15G \
CCACHE_SLOPPINESS=pch_defines,time_macros
LABEL ccache.dir=/opt/ccache \
ccache.size=15G
# Jenkins node
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
openssh-client \
rsync \
sudo && \
rm -rf /var/lib/apt/lists/*
RUN groupadd --gid 1001 jenkins || true && \
adduser --uid 500 --gid 1001 --disabled-password --gecos "" jenkins && \
echo "jenkins ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
echo "jenkins:jenkins" | chpasswd
USER jenkins
WORKDIR /home/jenkins
FROM ubuntu:17.10
RUN apt-get update && apt-get install -y curl \
&& curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \
&& apt-get update && apt-get -y install \
ccache \
g++-6 \
git git-lfs \
python3-pip \
sudo \
unzip
ENV CC=gcc-6
ENV CXX=g++-6
RUN python3 -m pip install --upgrade pip \
&& python3 -m pip install cmake conan>=1.10.0
# Ninja
RUN curl -L -o ninja-linux.zip https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip \
&& unzip ninja-linux.zip \
&& mv ninja /usr/local/bin/ninja \
&& rm ninja-linux.zip
# Add user jenkins to the image
RUN adduser --uid 500 --disabled-password --gecos "" jenkins \
# Add user jenkins to sudoers with NOPASSWD
&& echo "jenkins ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
# Set password for the jenkins user (you may want to alter this).
&& echo "jenkins:jenkins" | chpasswd
USER jenkins
ENV CCACHE_DIR=/home/jenkins/cache/ccache
RUN mkdir -p $CCACHE_DIR
ENV CCACHE_MAXSIZE=15G
ENV CCACHE_SLOPPINESS=pch_defines,time_macros
WORKDIR /home/jenkins
RUN conan user
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment