Commit 50fade96 authored by Daniel Scheffler's avatar Daniel Scheffler

Revised docker setup workflow.

parent 56d6e09f
Pipeline #1568 passed with stages
in 1 minute and 2 seconds
......@@ -17,8 +17,8 @@ stages:
test_geoarray:
stage: test
script:
- source /root/anaconda3/bin/activate
- export GDAL_DATA=/root/anaconda3/share/gdal
- source /root/miniconda3/bin/activate
- export GDAL_DATA=/root/miniconda3/share/gdal
- export PYTHONPATH=$PYTHONPATH:/root # /root <- directory needed later
- export LD_LIBRARY_PATH=/root/anaconda3/lib:$LD_LIBRARY_PATH # /root <- directory needed later
# update in-house dependencies
......@@ -38,8 +38,8 @@ test_geoarray:
test_styles:
stage: test
script:
- source /root/anaconda3/bin/activate
- export GDAL_DATA=/root/anaconda3/share/gdal
- source /root/miniconda3/bin/activate
- export GDAL_DATA=/root/miniconda3/share/gdal
- export PYTHONPATH=$PYTHONPATH:/root # /root <- directory needed later
- make lint
artifacts:
......@@ -53,8 +53,8 @@ test_styles:
test_geoarray_install:
stage: test
script:
- source /root/anaconda3/bin/activate
- export GDAL_DATA=/root/anaconda3/share/gdal
- source /root/miniconda3/bin/activate
- export GDAL_DATA=/root/miniconda3/share/gdal
- conda create -y -q --name geoarray python=3
- source activate geoarray
# resolve some requirements with conda
......@@ -106,7 +106,7 @@ deploy_pypi:
dependencies:
- test_geoarray
script: # Configure the PyPI credentials, then push the package, and cleanup the creds.
- source /root/anaconda3/bin/activate
- source /root/miniconda3/bin/activate
- printf "[distutils]\nindex-servers =\n pypi\n\n" >> ~/.pypirc
- printf "[pypi]\n""repository:"" https://upload.pypi.org/legacy/\n" >> ~/.pypirc
- printf "username= ${PYPI_USER}\n" >> ~/.pypirc
......
......@@ -2,7 +2,7 @@
context_dir="./context"
dockerfile="geoarray_ci.docker"
tag="geoarray_ci:0.6.16"
tag="geoarray_ci:0.6.17"
gitlab_runner="geoarray_gitlab_CI_runner"
echo "#### Build runner docker image"
......
name: geoarray
channels: &id1
- http://conda.anaconda.org/ioam # only for holoviews
- http://conda.anaconda.org/conda-forge
dependencies:
- python=3.*.*
- pyqt
- numpy
- gdal
- scikit-image
- rasterio
- pyproj
- lxml
- geopandas
- ipython
- matplotlib
- basemap
- shapely
- holoviews
- bokeh
- pip:
- dicttoxml
- jsmin
- cerberus
- pyprind
- pint
- iso8601
- tqdm
- mpld3
- sphinx-argparse
- six
- spectral
- flake8
- pycodestyle
- pylint
- pydocstyle
- nose
- nose2
- nose-htmloutput
- coverage
- rednose
- py_tools_ds>=0.10.0
- pandas
- dill
- mpld3
- geojson
- folium
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 python-devel gdb
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 ioam holoviews bokeh ; \
conda install --yes -c conda-forge numpy gdal scikit-image matplotlib rasterio pyproj basemap shapely geopandas; \
conda install --yes -c conda-forge 'icu=58.*' lxml ; \
pip install pandas dill dicttoxml jsmin cerberus pyprind pint iso8601 tqdm mpld3 sphinx-argparse \
folium geojson py_tools_ds>=0.9.0 flake8 pycodestyle pylint pydocstyle nose nose2 nose-htmloutput coverage \
rednose"
FROM gms_base_centos:pinned_v0.1
# copy some needed stuff to /root
#COPY *.pkl /root/ # EXAMPLE
#COPY *.h5 /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"
COPY *.yml /root/
# 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())")'
RUN /bin/bash -i -c "\
source /root/miniconda3/bin/activate ; \
conda env update -n root -f /root/environment_geoarray.yml"
Markdown is supported
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