From 8e93748643719c014e12361698b1a9e34e7d96b6 Mon Sep 17 00:00:00 2001 From: Lukas Leufen <l.leufen@fz-juelich.de> Date: Thu, 14 Jul 2022 17:41:04 +0200 Subject: [PATCH] add Dockerfile --- CI/Dockerfile | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 CI/Dockerfile diff --git a/CI/Dockerfile b/CI/Dockerfile new file mode 100644 index 00000000..f3b99b2f --- /dev/null +++ b/CI/Dockerfile @@ -0,0 +1,65 @@ +# ---- base node ---- +FROM opensuse/leap:latest AS base +MAINTAINER Lukas Leufen <l.leufen@fz-juelich.de> + +# install git +RUN zypper --non-interactive install git + +# install python3 +RUN zypper --non-interactive install python39 python39-devel + +# install pip +RUN zypper --non-interactive install python39-pip + +# upgrade pip +RUN pip3.9 install --upgrade pip + +# install curl +RUN zypper --non-interactive install curl + +# install make +RUN zypper --non-interactive install make + +# install gcc +RUN zypper --non-interactive install gcc-c++ + +# create and activate venv +ENV VIRTUAL_ENV=/opt/venv +RUN python3.9 -m venv $VIRTUAL_ENV +ENV PATH="$VIRTUAL_ENV/bin:$PATH" +# RUN source venv/bin/activate + +# ---- test node ---- +FROM base AS test + +# install pytest +RUN pip install pytest pytest-html pytest-lazy-fixture + +# ---- coverage node ---- +FROM test AS coverage + +# install pytest coverage +RUN pip install pytest-cov + +# ---- docs node ---- +FROM base AS docs + +# install sphinx +RUN pip install sphinx + +# ---- MLAir ready to use ---- +FROM base AS mlair + +# install geo packages +RUN zypper --no-gpg-checks addrepo https://download.opensuse.org/repositories/Application:Geo/15.4/Application:Geo.repo +RUN zypper --no-gpg-checks refresh +RUN zypper --no-gpg-checks --non-interactive install proj=8.2.1 +RUN zypper --no-gpg-checks --non-interactive install geos=3.10.3 +RUN zypper --no-gpg-checks --non-interactive install geos-devel=3.9.1 +RUN zypper --no-gpg-checks --non-interactive install libproj22=8.2.1 +RUN zypper --no-gpg-checks --non-interactive install binutils libproj-devel gdal-devel + +# install requirements +ADD requirements.txt . +RUN pip install -r requirements.txt + -- GitLab