ISCE_INSAR/docker/Dockerfile

67 lines
1.3 KiB
Docker
Raw Normal View History

FROM ubuntu:20.04 as builder
# Set an encoding to make things work smoothly.
ENV LANG en_US.UTF-8
ENV TZ US/Pacific
ARG DEBIAN_FRONTEND=noninteractive
RUN set -ex \
&& apt-get update \
&& apt-get install -y \
cmake \
cython3 \
git \
libfftw3-dev \
libgdal-dev \
libhdf4-alt-dev \
libhdf5-dev \
libopencv-dev \
ninja-build \
python3-gdal \
python3-h5py \
python3-numpy \
python3-scipy \
&& echo done
# copy repo
various updates from ARIA-related projects (#149) * add Dockerfile and SConfigISCE to build cuda-enabled modules * add Dockerfile and SConfigISCE to build cuda-enabled modules * set correct name * update for centos7 and cuda-dev image * restore * disable GPUampcor * update * save * sync up Dockerfile updates * fix base image * change docker image names * create gpu vs. cpu specific tags * update with nodata WBD Stitcher * fix segmentation fault when running sciflo workflows - remove dependencies that downgrade the `geos` conda package * sync fix for segmentation fault to cuda builds * ping ffi to version 1.12.2 Latest version of ffi, 1.13.0, breaks installation of fpm: ``` $ sudo gem install --no-ri --no-rdoc fpm Fetching: cabin-0.9.0.gem (100%) Successfully installed cabin-0.9.0 Fetching: backports-3.17.2.gem (100%) Successfully installed backports-3.17.2 Fetching: arr-pm-0.0.10.gem (100%) Successfully installed arr-pm-0.0.10 Fetching: clamp-1.0.1.gem (100%) Successfully installed clamp-1.0.1 Fetching: ffi-1.13.0.gem (100%) ERROR: Error installing fpm: ffi requires Ruby version >= 2.3. ``` TODO: remove pin when ffi's backwards compatiblity is restored. * comment out unused import * add build circleci job to PR tests * pin ffi in cuda build * revert logging hackery * fix "target_include_directories called with non-compilable target type" errors * Keep source directory for topsStack Co-authored-by: dustinlo <dustin.k.lo@jpl.nasa.gov> Co-authored-by: shitong01 <stchin@ntu.edu.sg> Co-authored-by: Ryan Burns <47790121+rtburns-jpl@users.noreply.github.com>
2020-07-16 23:08:57 +00:00
COPY . /opt/isce2/src/isce2
# build ISCE
RUN set -ex \
various updates from ARIA-related projects (#149) * add Dockerfile and SConfigISCE to build cuda-enabled modules * add Dockerfile and SConfigISCE to build cuda-enabled modules * set correct name * update for centos7 and cuda-dev image * restore * disable GPUampcor * update * save * sync up Dockerfile updates * fix base image * change docker image names * create gpu vs. cpu specific tags * update with nodata WBD Stitcher * fix segmentation fault when running sciflo workflows - remove dependencies that downgrade the `geos` conda package * sync fix for segmentation fault to cuda builds * ping ffi to version 1.12.2 Latest version of ffi, 1.13.0, breaks installation of fpm: ``` $ sudo gem install --no-ri --no-rdoc fpm Fetching: cabin-0.9.0.gem (100%) Successfully installed cabin-0.9.0 Fetching: backports-3.17.2.gem (100%) Successfully installed backports-3.17.2 Fetching: arr-pm-0.0.10.gem (100%) Successfully installed arr-pm-0.0.10 Fetching: clamp-1.0.1.gem (100%) Successfully installed clamp-1.0.1 Fetching: ffi-1.13.0.gem (100%) ERROR: Error installing fpm: ffi requires Ruby version >= 2.3. ``` TODO: remove pin when ffi's backwards compatiblity is restored. * comment out unused import * add build circleci job to PR tests * pin ffi in cuda build * revert logging hackery * fix "target_include_directories called with non-compilable target type" errors * Keep source directory for topsStack Co-authored-by: dustinlo <dustin.k.lo@jpl.nasa.gov> Co-authored-by: shitong01 <stchin@ntu.edu.sg> Co-authored-by: Ryan Burns <47790121+rtburns-jpl@users.noreply.github.com>
2020-07-16 23:08:57 +00:00
&& cd /opt/isce2/src/isce2 \
&& mkdir build && cd build \
&& cmake .. \
-DPYTHON_MODULE_DIR="$(python3 -c 'import site; print(site.getsitepackages()[-1])')" \
-DCMAKE_INSTALL_PREFIX=install \
&& make -j8 install \
&& cpack -G DEB \
&& cp isce*.deb /tmp/
FROM ubuntu:20.04
# Set an encoding to make things work smoothly.
ENV LANG en_US.UTF-8
ENV TZ US/Pacific
ARG DEBIAN_FRONTEND=noninteractive
RUN set -ex \
&& apt-get update \
&& apt-get install -y \
libfftw3-3 \
libgdal26 \
libhdf4-0 \
libhdf5-103 \
libopencv-core4.2 \
libopencv-highgui4.2 \
libopencv-imgproc4.2 \
python3-gdal \
python3-h5py \
python3-numpy \
python3-scipy \
&& echo done
# install ISCE from DEB
COPY --from=builder /tmp/isce*.deb /tmp/isce2.deb
RUN dpkg -i /tmp/isce2.deb