Skip to content

Commit 80fcb0e

Browse files
rtburns-jplGitHub Enterprise
authored andcommitted
Merge pull request #976 from rtburns/oracle8
Default CI to new Oracle Linux 8 image set
2 parents fe6cba7 + faf738c commit 80fcb0e

File tree

13 files changed

+587
-2
lines changed

13 files changed

+587
-2
lines changed

tools/imagesets/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
from . import alpine, centos7
1+
from . import alpine, centos7, oracle8
22
from .imgset import projsrcdir
33

44
imagesets = {
55
"alpine": alpine.AlpineImageSet,
66
"centos7conda": centos7.Centos7CondaImageSet,
7+
"oracle8conda": oracle8.Oracle8CondaImageSet,
78
}

tools/imagesets/oracle8.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from .imgset import ImageSet
2+
3+
class Oracle8CondaImageSet(ImageSet):
4+
def __init__(self, **kwargs):
5+
super().__init__("oracle8conda", **kwargs)
6+
self.build_args += " --build-arg conda_prefix=/opt/conda"
7+
self.cmake_defs.update({
8+
# Set DESTDIR so that paths outside of conventional prefix
9+
# (i.e. python components en route to conda prefix)
10+
# are coerced to install regardless
11+
"CPACK_SET_DESTDIR": "YES",
12+
13+
# Tell rpm to use conda's python for installation,
14+
# overriding the system python
15+
"CPACK_RPM_SPEC_MORE_DEFINE":
16+
'"%define __python $CONDA_PREFIX/bin/python"',
17+
18+
# Point to nonstandard git location
19+
"GIT_EXECUTABLE": "/opt/conda/bin/git",
20+
})
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
ARG runtime_img
2+
FROM $runtime_img
3+
4+
# Install dependencies for ISCE developement
5+
RUN set -ex \
6+
&& yum update -y \
7+
&& yum install -y \
8+
cuda-cudart-devel-$CUDA_PKG_VERSION \
9+
cuda-nvcc-$CUDA_PKG_VERSION \
10+
libcufft-devel-$CUDA_PKG_VERSION \
11+
rpm-build \
12+
&& yum clean all \
13+
&& rm -rf /var/cache/yum \
14+
&& rm -rf /var/cache/yum
15+
16+
COPY spec-file.txt /tmp/spec-file.txt
17+
RUN conda install --yes --file /tmp/spec-file.txt \
18+
&& conda clean -tipsy \
19+
&& rm -rf /opt/conda/pkgs \
20+
&& rm /tmp/spec-file.txt
21+
22+
ENV CUDAHOSTCXX=x86_64-conda_cos6-linux-gnu-g++
23+
ENV CUDACXX=/usr/local/cuda-${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}/bin/nvcc
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
cmake>=3.18
2+
doxygen
3+
eigen
4+
git
5+
gmock
6+
gtest
7+
gxx_linux-64>=9,<10
8+
ninja
9+
pybind11
10+
pytest

tools/imagesets/oracle8conda/dev/spec-file.txt

Lines changed: 200 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
ARG runtime_img
2+
FROM $runtime_img
3+
4+
# Extract ISCE3 installation to /usr
5+
COPY isce3.rpm /
6+
# XXX dependencies from conda env not detected correctly
7+
RUN rpm -i isce3.rpm --nodeps \
8+
&& echo /usr/local/lib64 >> /etc/ld.so.conf.d/isce3.conf && ldconfig
9+
RUN rm isce3.rpm
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
ARG distrib_img
2+
# create intermediate image to hide credentials
3+
FROM alpine
4+
5+
# install git
6+
RUN apk add git
7+
8+
# add credentials on build
9+
ARG GIT_OAUTH_TOKEN
10+
RUN cd /opt \
11+
&& git clone https://[email protected]/NISAR-ADT/SoilMoisture \
12+
&& git clone https://[email protected]/NISAR-ADT/QualityAssurance \
13+
&& git clone https://[email protected]/NISAR-ADT/CFChecker \
14+
&& git clone https://[email protected]/NISAR-ADT/calTools \
15+
&& cd /opt/QualityAssurance && git checkout 448db8d && rm -rf .git \
16+
&& cd /opt/CFChecker && git checkout R2 && rm -rf .git \
17+
&& cd /opt/calTools && git checkout 5607f81 && rm -rf .git \
18+
&& cd /opt/SoilMoisture && git checkout 80e14ac && rm -rf .git
19+
20+
FROM $distrib_img
21+
22+
RUN conda install testfixtures scikit-image --channel conda-forge
23+
RUN conda install cfunits --channel conda-forge
24+
25+
# Soil Moisture
26+
COPY soilmoisture-spec-file.txt /tmp/spec-file.txt
27+
RUN conda create -n SoilMoisture --file /tmp/spec-file.txt && conda clean -ay
28+
29+
# copy the repo from the intermediate image
30+
COPY --from=0 /opt/QualityAssurance /opt/QualityAssurance
31+
COPY --from=0 /opt/CFChecker /opt/CFChecker
32+
COPY --from=0 /opt/calTools /opt/calTools
33+
COPY --from=0 /opt/SoilMoisture /opt/SoilMoisture
34+
35+
# install
36+
RUN cd /opt/QualityAssurance && python setup.py install
37+
RUN cd /opt/CFChecker && python setup.py install
38+
RUN cd /opt/calTools && python setup.py install
39+
RUN cd /opt/SoilMoisture && conda run -n SoilMoisture make install
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
gcc
2+
gfortran
3+
make
4+
netcdf-cxx4
5+
netcdf-fortran
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This file may be used to create an environment using:
2+
# $ conda create --name <env> --file <this file>
3+
# platform: linux-64
4+
@EXPLICIT
5+
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2
6+
https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2021.10.8-ha878542_0.tar.bz2
7+
https://conda.anaconda.org/conda-forge/noarch/kernel-headers_linux-64-2.6.32-he073ed8_15.tar.bz2
8+
https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.36.1-hea4e1c9_2.tar.bz2
9+
https://conda.anaconda.org/conda-forge/linux-64/libgcc-devel_linux-64-11.2.0-h0952999_12.tar.bz2
10+
https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-11.2.0-h5c6108e_12.tar.bz2
11+
https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-11.2.0-he4da1e4_12.tar.bz2
12+
https://conda.anaconda.org/conda-forge/linux-64/libgfortran-ng-11.2.0-h69a702a_12.tar.bz2
13+
https://conda.anaconda.org/conda-forge/linux-64/libgomp-11.2.0-h1d223b6_12.tar.bz2
14+
https://conda.anaconda.org/conda-forge/noarch/sysroot_linux-64-2.12-he073ed8_15.tar.bz2
15+
https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-1_gnu.tar.bz2
16+
https://conda.anaconda.org/conda-forge/linux-64/binutils_impl_linux-64-2.36.1-h193b22a_2.tar.bz2
17+
https://conda.anaconda.org/conda-forge/linux-64/binutils_linux-64-2.36-hf3e587d_4.tar.bz2
18+
https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-11.2.0-h1d223b6_12.tar.bz2
19+
https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-h7f98852_4.tar.bz2
20+
https://conda.anaconda.org/conda-forge/linux-64/c-ares-1.18.1-h7f98852_0.tar.bz2
21+
https://conda.anaconda.org/conda-forge/linux-64/jpeg-9e-h7f98852_0.tar.bz2
22+
https://conda.anaconda.org/conda-forge/linux-64/libev-4.33-h516909a_1.tar.bz2
23+
https://conda.anaconda.org/conda-forge/linux-64/libsanitizer-11.2.0-he4da1e4_12.tar.bz2
24+
https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.2.11-h36c2ea0_1013.tar.bz2
25+
https://conda.anaconda.org/conda-forge/linux-64/make-4.3-hd18ef5c_1.tar.bz2
26+
https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.3-h9c3ff4c_0.tar.bz2
27+
https://conda.anaconda.org/conda-forge/linux-64/openssl-3.0.0-h7f98852_2.tar.bz2
28+
https://conda.anaconda.org/conda-forge/linux-64/gcc_impl_linux-64-11.2.0-h82a94d6_12.tar.bz2
29+
https://conda.anaconda.org/conda-forge/linux-64/libedit-3.1.20191231-he28a2e2_2.tar.bz2
30+
https://conda.anaconda.org/conda-forge/linux-64/zlib-1.2.11-h36c2ea0_1013.tar.bz2
31+
https://conda.anaconda.org/conda-forge/linux-64/gcc-11.2.0-h702ea55_4.tar.bz2
32+
https://conda.anaconda.org/conda-forge/linux-64/gcc_linux-64-11.2.0-h39a9532_4.tar.bz2
33+
https://conda.anaconda.org/conda-forge/linux-64/gfortran_impl_linux-64-11.2.0-h7a446d4_12.tar.bz2
34+
https://conda.anaconda.org/conda-forge/linux-64/hdf4-4.2.15-h10796ff_3.tar.bz2
35+
https://conda.anaconda.org/conda-forge/linux-64/libnghttp2-1.46.0-ha19adfc_0.tar.bz2
36+
https://conda.anaconda.org/conda-forge/linux-64/libssh2-1.10.0-ha35d2d1_2.tar.bz2
37+
https://conda.anaconda.org/conda-forge/linux-64/libzip-1.8.0-h1c5bbd1_1.tar.bz2
38+
https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.11-h27826a3_1.tar.bz2
39+
https://conda.anaconda.org/conda-forge/linux-64/gfortran_linux-64-11.2.0-h777b47f_4.tar.bz2
40+
https://conda.anaconda.org/conda-forge/linux-64/krb5-1.19.2-h48eae69_3.tar.bz2
41+
https://conda.anaconda.org/conda-forge/linux-64/gfortran-11.2.0-h8811e0c_4.tar.bz2
42+
https://conda.anaconda.org/conda-forge/linux-64/libcurl-7.81.0-h494985f_0.tar.bz2
43+
https://conda.anaconda.org/conda-forge/linux-64/curl-7.81.0-h494985f_0.tar.bz2
44+
https://conda.anaconda.org/conda-forge/linux-64/hdf5-1.12.1-nompi_h7f166f4_103.tar.bz2
45+
https://conda.anaconda.org/conda-forge/linux-64/libnetcdf-4.8.1-nompi_hb3fd0d9_101.tar.bz2
46+
https://conda.anaconda.org/conda-forge/linux-64/netcdf-cxx4-4.3.1-nompi_h8a6a9d2_105.tar.bz2
47+
https://conda.anaconda.org/conda-forge/linux-64/netcdf-fortran-4.5.4-nompi_h2b6e579_100.tar.bz2
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Use pinned oraclelinux:8 image
2+
FROM oraclelinux:8.4@sha256:ef0327c1a51e3471e9c2966b26b6245bd1f4c3f7c86d7edfb47a39adb446ceb5
3+
4+
RUN yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo
5+
6+
# Trying to install a package that doesn't exist should be an error.
7+
RUN yum update -y \
8+
&& yum clean all \
9+
&& echo 'skip_missing_names_on_install=False' >> /etc/yum.conf \
10+
&& rm -rf /var/cache/yum
11+
12+
# install latest miniconda
13+
ARG conda_prefix
14+
RUN curl -sSL https://repo.anaconda.com/miniconda/Miniconda3-py39_4.9.2-Linux-x86_64.sh \
15+
-o miniconda.sh \
16+
&& bash miniconda.sh -b -p $conda_prefix \
17+
&& rm miniconda.sh
18+
ENV PATH="$conda_prefix/bin:$PATH"
19+
20+
COPY spec-file.txt /tmp/spec-file.txt
21+
RUN conda install --yes --file /tmp/spec-file.txt \
22+
&& conda clean -tipsy \
23+
&& rm -rf /opt/conda/pkgs \
24+
&& rm /tmp/spec-file.txt
25+
26+
# set up conda environment
27+
RUN echo ". $conda_prefix/etc/profile.d/conda.sh" >> /etc/bashrc \
28+
&& echo "conda activate base" >> /etc/bashrc
29+
ENV GDAL_DATA=$conda_prefix/share/gdal
30+
ENV GDAL_DRIVER_PATH=$conda_prefix/lib/gdalplugins
31+
ENV PROJ_LIB=$conda_prefix/share/proj
32+
ENV MPLCONFIGDIR=/tmp
33+
34+
ENV CUDA_VERSION_MAJOR 11
35+
ENV CUDA_VERSION_MINOR 0
36+
ENV CUDA_PKG_VERSION "${CUDA_VERSION_MAJOR}-${CUDA_VERSION_MINOR}"
37+
38+
RUN yum install -y \
39+
cuda-cudart-$CUDA_PKG_VERSION \
40+
libcufft-$CUDA_PKG_VERSION \
41+
&& yum clean all \
42+
&& rm -rf /var/cache/yum
43+
44+
# https://github.com/NVIDIA/nvidia-container-runtime#environment-variables-oci-spec
45+
ENV NVIDIA_VISIBLE_DEVICES all
46+
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
47+
ENV NVIDIA_REQUIRE_CUDA "cuda>=${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}"

0 commit comments

Comments
 (0)