Commit 2acb2f2f authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

CI now uses Mambaforge. Revised test_gms_preprocessing_install CI job.


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 51c2ee54
Pipeline #27285 failed with stages
in 0 seconds
......@@ -17,15 +17,11 @@ stages:
test_gms_preprocessing:
stage: test
script:
- source /root/miniconda3/bin/activate ci_env
- source /root/mambaforge/bin/activate ci_env
- export GMS_db_host=${GMS_DB_HOST}
- export GMS_index_host=${GMS_INDEX_HOST}
- export GMS_index_port=${GMS_INDEX_PORT}
- conda install -c conda-forge cartopy # TODO remove as soon as docker container is rebuilt
- pip install "geoarray>=0.9.0" # TODO remove as soon as docker container is rebuilt
- pip install "arosics>=1.0.0" # TODO remove as soon as docker container is rebuilt
# update sicor
# - rm -rf context/sicor
# - git clone https://git.gfz-potsdam.de/EnMAP/sicor.git ./context/sicor
......@@ -58,7 +54,7 @@ test_gms_preprocessing:
test_urls:
stage: test
script:
- source /root/miniconda3/bin/activate ci_env
- source /root/mambaforge/bin/activate ci_env
- pip install -U urlchecker
- make urlcheck
when: always
......@@ -67,27 +63,18 @@ test_urls:
test_gms_preprocessing_install:
stage: test
script:
- source /root/miniconda3/bin/activate
- source /root/mambaforge/bin/activate
# update conda and python
- conda update -c conda-forge conda
# - conda update -c conda-forge python
# update base environment
- mamba update -c conda-forge --all
# create gms_test environment
- conda create -y -q -c conda-forge --name gms_test python=3
- conda activate gms_test
# avoid package incompatibilities
# - conda config --set channel_priority strict # otherwise gdal or libgdal may be installed from defaults channel
# install some dependencies that cause trouble when installed via pip
- conda install -y -c conda-forge numpy gdal scikit-image pyproj geopandas ipython matplotlib cartopy scikit-learn=0.23.2 shapely pyhdf python-fmask holoviews
# install not pip-installable deps of arosics
- conda install -y -c conda-forge pyfftw pykrige
# install not pip-installable deps of sicor
- conda install -y -c conda-forge glymur pygrib cachetools pyhdf h5py pytables llvmlite numba
# create gms_test environment from environment_gms_preprocessing.yml
- mamba env create --name gms_test -f tests/CI_docker/context/environment_gms_preprocessing.yml
- conda activate gms_test
# install gms_preprocessing
- pip install -e .
......@@ -107,7 +94,7 @@ test_gms_preprocessing_install:
test_styles:
stage: test
script:
- source /root/miniconda3/bin/activate ci_env
- source /root/mambaforge/bin/activate ci_env
- make lint
artifacts:
paths:
......@@ -157,7 +144,7 @@ deploy_pypi:
dependencies:
- test_gms_preprocessing
script:
- source /root/miniconda3/bin/activate ci_env
- source /root/mambaforge/bin/activate ci_env
- pip install -U twine
- python setup.py sdist
- twine upload dist/* # requires creds as environment variables
......
FROM ci_base_centos:0.1
FROM ci_base_centos:0.2
# copy some needed stuff to /root
COPY *.yml /root/
......@@ -6,10 +6,10 @@ COPY *.sh /root/
# update the ci_env environment (that already contains all packages installed via 'docker_pyenvs' repo)
RUN /bin/bash -i -c "\
source /root/miniconda3/bin/activate; \
conda update -n base -c conda-forge conda;\
source /root/mambaforge/bin/activate; \
mamba update -n base -c conda-forge --all;\
conda activate ci_env; \
conda env update -n ci_env -f /root/environment_gms_preprocessing.yml"
mamba env update -n ci_env -f /root/environment_gms_preprocessing.yml"
# download SICOR atmospheric lookup tables and copy already created cache files to SICOR root dir to speed up SICOR in CI jobs
RUN mkdir /tmp/sicor_cache
......
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