Commit f2142724 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Revised docker container setup files.



Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent fb439c60
Pipeline #14495 failed with stage
in 3 minutes and 12 seconds
......@@ -2,20 +2,17 @@ FROM ci_base_centos:0.1
# copy some needed stuff to /root
COPY *.yml /root/
COPY *.sh /root/
# update the ci_env environment (that already contains all packages installed via 'docker_pyenvs' repo)
ENV pycmd_tabledownload="from sicor.tables import get_tables; get_tables(sensor="s2"); get_tables(sensor="l8")"
RUN /bin/bash -i -c "\
source /root/miniconda3/bin/activate; \
conda update -n base -c conda-forge conda;\
conda activate ci_env; \
conda env update -n ci_env -f /root/environment_gms_preprocessing.yml; \
python -c ${pycmd_tabledownload}"
source activate ci_env; \
conda env update -n ci_env -f /root/environment_gms_preprocessing.yml"
# copy sicor cache files to sicor root directory (speeds up SICOR CI tests because table subsets dont have to be created each time)
# -> sicor root directory is the default directory of these cache files if sicor_cache_dir is not set in EnPT options
# 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
COPY *.zip /tmp/sicor_cache
COPY *.zip /tmp/sicor_cache/
RUN /bin/bash -i -c "\
SICOR_PATH=$(python -c 'from sicor import __path__; print(__path__)'); \
mv /tmp/sicor_cache/*.zip ${SICOR_PATH}"
bash /root/setup_sicor_tables_and_cachefiles.sh"
#!/usr/bin/env bash
source /root/miniconda3/bin/activate ci_env
# copy sicor cache files to sicor root directory (speeds up SICOR CI tests because table subsets dont have to be created each time)
# -> sicor root directory is the default directory of these cache files if sicor_cache_dir is not set in EnPT options
SICOR_PATH=$(python -c "from sicor import __path__; print(__path__[0])")
echo Copying SICOR cache files to ${SICOR_PATH}/...
cp /tmp/sicor_cache/*.zip ${SICOR_PATH}/
# download atmospheric lookup tables to save time when running CI jobs later
echo Downloading SICOR atmospheric lookup tables...
python -c "from sicor.tables import get_tables; get_tables(sensor=\"s2\"); get_tables(sensor=\"l8\")"
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