From 5dfc8ff9f03c7918891dcd70a2b75e2917728a0e Mon Sep 17 00:00:00 2001
From: Dominique BENIELLI <dominique.benielli@univ-amu.fr>
Date: Fri, 19 Jul 2019 18:07:27 +0200
Subject: [PATCH] add docker

---
 .gitlab-ci.yml                 | 38 ++++++++++++++++++++++++++++++++++
 docker/Dockerfile_ubuntu_18.04 | 38 ++++++++++++++++++++++++++++++++++
 requirements.txt               | 11 ++++++++++
 3 files changed, 87 insertions(+)
 create mode 100644 .gitlab-ci.yml
 create mode 100644 docker/Dockerfile_ubuntu_18.04
 create mode 100755 requirements.txt

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..15a9db87
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,38 @@
+# run the test suite
+tests:
+    image: registry.gitlab.lis-lab.fr:5005/baptiste.bauvin/multiview-machine-learning-omis/ubuntu:18.04
+    tags:
+        - docker
+    script:
+        - pip install -e . --no-deps
+        - pytest-3
+
+# generate the documentation
+doc:
+    image: registry.gitlab.lis-lab.fr:5005/baptiste.bauvin/multiview-machine-learning-omis/ubuntu:18.04
+    tags:
+        - docker
+    only:
+        - master
+    script:
+        - export LC_ALL=$(locale -a | grep en_US)
+        - export LANG=$(locale -a | grep en_US)
+        - python3 setup.py build_sphinx
+
+# TODO: Replace the task doc by the following task pages when making the
+# project public
+#
+#pages:
+#    image: registry.gitlab.lis-lab.fr:5005/baptiste.bauvin/multiview-machine-learning-omis/ubuntu:18.04
+#    tags:
+#        - docker
+#    only:
+#        - master
+#    script:
+#        - export LC_ALL=$(locale -a | grep en_US)
+#        - export LANG=$(locale -a | grep en_US)
+#        - python3 setup.py build_sphinx
+#        - cp -r build/sphinx/html public
+#    artifacts:
+#        paths:
+#            - public
diff --git a/docker/Dockerfile_ubuntu_18.04 b/docker/Dockerfile_ubuntu_18.04
new file mode 100644
index 00000000..7064545d
--- /dev/null
+++ b/docker/Dockerfile_ubuntu_18.04
@@ -0,0 +1,38 @@
+FROM ubuntu:18.04
+MAINTAINER Dominique Benielli
+WORKDIR /
+ENV DEBIAN_FRONTEND noninteractive
+RUN apt-get update && \
+    apt-get upgrade -y && \
+    apt-get install -y --no-install-recommends apt-utils \
+        cmake \
+        gcc \
+        g++ \
+        make \
+        python3-dev \
+        python3-setuptools \
+        python3-pytest \
+        python3-pytest-cov \
+        python3-nose \
+        python3-pip \
+        python3-sphinx \
+        python3-numpydoc \
+        python3-matplotlib \
+        python3-sphinx-gallery \
+        python3-pil \
+        libhdf5-dev \
+        git \
+        && \
+    apt-get clean
+RUN apt-get install -y --no-install-recommends locales && \
+    apt-get clean && \
+    locale-gen en_US.UTF-8 && \
+    update-locale en_US.UTF-8 && \
+    echo "export LC_ALL=$(locale -a | grep en_US)" >> /root/.bashrc && \
+    echo "export LANG=$(locale -a | grep en_US)" >>  /root/.bashrc
+COPY requirements.txt .
+RUN pip3 install -r requirements.txt
+
+
+
+
diff --git a/requirements.txt b/requirements.txt
new file mode 100755
index 00000000..27cfb086
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,11 @@
+cycler==0.10.0
+h5py==2.9.0
+joblib==0.13.2
+kiwisolver==1.1.0
+numpy==1.16.4
+pyparsing==2.4.0
+-e git+https://github.com/aldro61/pyscm.git#egg=pyscm
+python-dateutil==2.8.0
+scikit-learn==0.19.0
+scipy==1.3.0
+six==1.12.0
-- 
GitLab