diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..141430e1e60faa816dfa2d881af6bd6d492c3fb9 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,33 @@ +# This file is a template, and might need editing before it works on your project. +# To contribute improvements to CI/CD templates, please follow the Development guide at: +# https://docs.gitlab.com/ee/development/cicd/templates.html +# This specific template is located at: +# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Docker.gitlab-ci.yml + +# Build a Docker image with CI/CD and push to the GitLab registry. +# Docker-in-Docker documentation: https://docs.gitlab.com/ee/ci/docker/using_docker_build.html +# +# This template uses one generic job with conditional builds +# for the default branch and all other (MR) branches. + +docker-build: + # Use the official docker image. + image: docker:latest + stage: build + services: + - docker:dind + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + # Default branch leaves tag empty (= latest tag) + # All other branches are tagged with the escaped branch name (commit ref slug) + script: + - tag="$CI_COMMIT_SHA" + - docker build --pull -t "${CI_REGISTRY_IMAGE}:${tag}" -f infiles_dps/dockerfile . + - docker push "${CI_REGISTRY_IMAGE}:${tag}" + # Run this job in a branch where a Dockerfile exists + rules: + - if: $CI_COMMIT_BRANCH + exists: + - infiles_dps/dockerfile + tags: + - shell diff --git a/configuration/sconsConfigFile.py b/configuration/sconsConfigFile.py index 86c2d1f5206f9e0944f755bd9d77ae487c1d014a..6d9eb8c91d888fbc9075819f07b79f41cbe8d983 100644 --- a/configuration/sconsConfigFile.py +++ b/configuration/sconsConfigFile.py @@ -35,7 +35,7 @@ import sys COMPILER_OPTIONS ={'COMPILER_OPTIMIZATION':'-O2','COMPILER_WARNING':'-Wall'} LINKER_OPTIONS ={'LINKFLAGS':'-fopenmp'} # some systems don't need it, but ubuntu does -GFORTRANFLAGS = ['-ffixed-line-length-none' ,'-fno-second-underscore', '-fPIC','-fno-range-check', '-fallow-argument-mismatch'] +GFORTRANFLAGS = ['-ffixed-line-length-none' ,'-fno-second-underscore', '-fPIC','-fno-range-check', '-Wno-argument-mismatch'] GCCFLAGS = ['-fPIC'] if 'DEVELOPER' in os.environ: GFORTRANFLAGS.append('-fbounds-check') diff --git a/infiles_dps/dockerfile b/infiles_dps/dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..ae2d8c8b5c209b92257c425200c1219a97857930 --- /dev/null +++ b/infiles_dps/dockerfile @@ -0,0 +1,19 @@ +FROM isce/isce2:20240804 + +RUN apt-get update -y && \ + apt-get install -y nano scons libfftw3-dev libxm4 libmotif-dev python3-dev python3-pip git && \ + apt-get install -y python3-scipy python3-opencv python3-numpy python3-h5py cython3 gdal-bin gfortran libgdal-dev python3-gdal libhdf5-dev python3.9-dev + +RUN pip3 install cython opencv-python opencv-contrib-python shapely requests + +RUN mkdir -p /home/pkgs /home/.isce +COPY . /home/pkgs/isce2 +RUN ln -s /home/pkgs/isce2 /home/pkgs/isce + +RUN cp /home/pkgs/isce2/infiles_dps/ISCE_config.sh /home/pkgs/isce2/ && \ + cp /home/pkgs/isce2/infiles_dps/read_calibration_slc.py /home/pkgs/isce2/contrib/stack/topsStack/ && \ + cp /home/pkgs/isce2/infiles_dps/SConfigISCE /home/.isce/ + +RUN bash /home/pkgs/isce2/infiles_dps/install.sh + +CMD ["/bin/bash"] diff --git a/infiles_dps/install.sh b/infiles_dps/install.sh new file mode 100644 index 0000000000000000000000000000000000000000..d6ee13e6315358bc4a06cbfa84939b6cb11072ea --- /dev/null +++ b/infiles_dps/install.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +export SCONS_CONFIG_DIR=/home/.isce +export PATH="/home/pkgs/isce/contrib/stack/topsStack:$PATH" +export ISCE_INSTALL_ROOT=/home/pkgs/isce +export PYTHONPATH=$ISCE_INSTALL_ROOT:$PYTHONPATH +export ISCE_HOME=$ISCE_INSTALL_ROOT/isce +export PATH=$ISCE_HOME/applications:$PATH + +pushd /home/pkgs/isce2 +scons install