Commit 346f1526 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Revised docker installer (now uses a basic conda environment and the gitlab...

Revised docker installer (now uses a basic conda environment and the gitlab runner container on top).
parent d058928e
Pipeline #1543 failed with stages
in 58 seconds
......@@ -103,3 +103,6 @@ install: clean ## install the package to the active Python's site-packages
gitlab_CI_docker: ## Build a docker image for CI use within gitlab
cd ./tests/CI_docker/; bash ./build_testsuite_image.sh
basic_pyenv_docker: ## Build a docker image containing Anaconda environment with all basic dependencies installed
cd ./tests/CI_docker/; bash ./build_basic_pyenv.sh
#!/usr/bin/env bash
context_dir="./context"
dockerfile="conda_pyenv.docker"
tag="conda_pyenv:0.1"
echo "#### Build basic pyenv docker image"
sudo docker rmi ${tag}
sudo docker build -f ${context_dir}/${dockerfile} -m 20G -t ${tag} ${context_dir}
......@@ -2,7 +2,7 @@
context_dir="./context"
dockerfile="py_tools_ds_ci.docker"
tag="py_tools_ds_ci:0.12.1"
tag="py_tools_ds_ci:0.12.2"
gitlab_runner="py_tools_ds_gitlab_CI_runner"
echo "#### Build runner docker image"
......
FROM centos:7
RUN yum update -y && \
yum install -y wget vim bzip2 gcc gcc-c++ make libgl1-mesa-glx mesa-libGL qt5-qtbase-gui git nano tree
ENV miniconda_dl 'Miniconda3-latest-Linux-x86_64.sh'
ENV envconfig 'environment_20171117.yml'
ENV envname '20171117_pyenv'
ENV git_lfs_v='2.1.1'
RUN /bin/bash -i -c "cd /root; wget https://repo.continuum.io/miniconda/$miniconda_dl ; \
bash -i /root/$miniconda_dl -b ; \
rm -f /root/$miniconda_dl"
# copy some needed stuff to /root
COPY *.yml /root/
RUN /bin/bash -i -c "source /root/miniconda3/bin/activate ; \
conda env create -n $envname -f /root/$envconfig"
# install git lfs
RUN /bin/bash -i -c "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | bash"
# installing git large file support, see here: https://git-lfs.github.com/ , change version number below for future upgrades
RUN /bin/bash -i -c "wget https://github.com/git-lfs/git-lfs/releases/download/v${git_lfs_v}/git-lfs-linux-amd64-${git_lfs_v}.tar.gz; \
tar -zxvf git-lfs-linux-amd64-${git_lfs_v}.tar.gz; \
cd git-lfs-${git_lfs_v}; \
bash ./install.sh"
name: py_tools_ds
channels: &id1
- http://conda.anaconda.org/ioam # only for holoviews
- http://conda.anaconda.org/conda-forge
dependencies:
- python=3.6.*
- pyqt=5.6.0
- numpy=1.13.3
- gdal=2.1.4
- scikit-image=0.13.0
- rasterio=0.36.0
- pyproj=1.9.5.1
- icu=58.*
- lxml=4.1.0
- geopandas=0.3.0
- ipython
- pip:
- dicttoxml
- jsmin
- cerberus
- pyprind
- pint
- iso8601
- tqdm
- mpld3
- sphinx-argparse
- six
- spectral
- flake8
- pycodestyle
- pylint
- pydocstyle
- nose
- nose2
- nose-htmloutput
- coverage
- rednose
FROM centos:7
RUN yum update -y && \
yum install -y wget vim bzip2 gcc gcc-c++ make libgl1-mesa-glx mesa-libGL qt5-qtbase-gui git
ENV anaconda_dl 'Anaconda3-5.0.0-Linux-x86_64.sh'
RUN /bin/bash -i -c "cd /root; wget https://repo.continuum.io/archive/$anaconda_dl ; \
bash -i /root/$anaconda_dl -b ; \
rm -f /root/$anaconda_dl"
# 'conda install --yes -c conda-forge 'icu=58.*' lxml' fixing a bug for conda-forge gdal build, as of 06/2017
RUN /bin/bash -i -c "source /root/anaconda3/bin/activate ; \
conda install --yes pyqt ; \
conda install --yes -c conda-forge numpy gdal scikit-image rasterio pyproj; \
conda install --yes -c conda-forge 'icu=58.*' lxml ; \
pip install geopandas dicttoxml jsmin cerberus pyprind pint iso8601 tqdm mpld3 sphinx-argparse six spectral \
flake8 pycodestyle pylint pydocstyle nose nose2 nose-htmloutput coverage rednose"
# copy some needed stuff to /root
#COPY *.pkl /root/ # EXAMPLE
# install git lfs
RUN /bin/bash -i -c "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | bash"
# installing git large file support, see here: https://git-lfs.github.com/ , change version number below for future upgrades
ENV git_lfs_v='2.1.1'
RUN /bin/bash -i -c "wget https://github.com/git-lfs/git-lfs/releases/download/v${git_lfs_v}/git-lfs-linux-amd64-${git_lfs_v}.tar.gz; \
tar -zxvf git-lfs-linux-amd64-${git_lfs_v}.tar.gz; \
cd git-lfs-${git_lfs_v}; \
bash ./install.sh"
# set matplotlib backend to Agg as default, Qt won't work in headless docker containers
RUN bash -i -c 'source /root/anaconda3/bin/activate; \
sed -i "/backend : tkagg/c\backend : Agg" $(python -c "import matplotlib; print(matplotlib.matplotlib_fname())"); \
sed -i "/backend : Qt4Agg/c\backend : Agg" $(python -c "import matplotlib; print(matplotlib.matplotlib_fname())"); \
sed -i "/backend : qt5agg/c\backend : Agg" $(python -c "import matplotlib; print(matplotlib.matplotlib_fname())")'
FROM conda_pyenv:latest
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment