diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2020-01-21 13:29:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-21 13:29:54 -0500 |
commit | 1bcf337692090b7b3f16af72c924b199153f3120 (patch) | |
tree | f5e145f7e77121d65d27da39dcbc9da0f551e526 | |
parent | baf286b2db71e82f41a909081d7d6eae090e8ede (diff) | |
parent | df956d197232e57a93c055d06996ec38b2653ed5 (diff) | |
download | docker-pipeline-master.tar.gz |
Add hstdp-2019.5
-rw-r--r-- | etc/hstdp-2019.5/pip/001-setuptools | 0 | ||||
-rw-r--r-- | etc/hstdp-2019.5/pip/002-testing | 3 | ||||
-rw-r--r-- | etc/hstdp-2019.5/pip/003-prerequisites | 4 | ||||
-rw-r--r-- | etc/hstdp-2019.5/pip/004-pipeline | 26 | ||||
-rw-r--r-- | etc/hstdp-2019.5/pkgs/000-dummy.sh | 2 | ||||
-rw-r--r-- | etc/hstdp-2019.5/pkgs/001-cfitsio.sh | 15 | ||||
-rw-r--r-- | etc/hstdp-2019.5/pkgs/002-hstcal.sh | 18 | ||||
-rwxr-xr-x | etc/hstdp-2019.5/tasks/001-packages.sh | 43 | ||||
-rwxr-xr-x | etc/hstdp-2019.5/tasks/002-python-packages.sh | 40 | ||||
-rwxr-xr-x | etc/hstdp-2019.5/tasks/999-clean.sh | 18 |
10 files changed, 169 insertions, 0 deletions
diff --git a/etc/hstdp-2019.5/pip/001-setuptools b/etc/hstdp-2019.5/pip/001-setuptools new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/etc/hstdp-2019.5/pip/001-setuptools diff --git a/etc/hstdp-2019.5/pip/002-testing b/etc/hstdp-2019.5/pip/002-testing new file mode 100644 index 0000000..dee8334 --- /dev/null +++ b/etc/hstdp-2019.5/pip/002-testing @@ -0,0 +1,3 @@ +nose==1.3.7 +pytest==4.5.0 +pytest-xdist==1.24.1 diff --git a/etc/hstdp-2019.5/pip/003-prerequisites b/etc/hstdp-2019.5/pip/003-prerequisites new file mode 100644 index 0000000..69a8d2e --- /dev/null +++ b/etc/hstdp-2019.5/pip/003-prerequisites @@ -0,0 +1,4 @@ +numpy==1.16.4 +scipy==1.2.1 +astropy==3.2.1 +matplotlib==3.1.0 diff --git a/etc/hstdp-2019.5/pip/004-pipeline b/etc/hstdp-2019.5/pip/004-pipeline new file mode 100644 index 0000000..b82334c --- /dev/null +++ b/etc/hstdp-2019.5/pip/004-pipeline @@ -0,0 +1,26 @@ +parsley==1.3 +d2to1==0.2.12 +stsci.convolve==2.2.2 +stsci.imagestats==1.6.2 +stsci.stimage==0.2.2 +crds==7.3.3 +pysynphot==0.9.12 +reftools==1.7.5 # packaging fixes, 2019.5 wants 1.7.3 +spherical-geometry==1.2.18 +stregion==1.1.4 +stsci.ndimage==0.10.3 # packaging fixes, 2019.5 wants 0.10.1 +stsci.tools==3.6.0 +acstools==3.0.0 +calcos==3.3.7 +fitsblender==0.3.6 # packaging fixes, 2019.5 wants 0.3.5 +nictools==1.1.5 # packaging fixes, 2019.5 wants 1.1.4 +stistools==1.3.0 +stsci.image==2.3.0 +stsci.imagemanip==1.1.4 +stwcs==1.5.1 +wfc3tools==1.3.5 +wfpc2tools==1.0.5 +costools==1.2.3 +stsci.skypac==1.0.4 +gwcs==0.10.0 +drizzlepac==3.1.3 diff --git a/etc/hstdp-2019.5/pkgs/000-dummy.sh b/etc/hstdp-2019.5/pkgs/000-dummy.sh new file mode 100644 index 0000000..06bd986 --- /dev/null +++ b/etc/hstdp-2019.5/pkgs/000-dummy.sh @@ -0,0 +1,2 @@ +#!/bin/bash +exit 0 diff --git a/etc/hstdp-2019.5/pkgs/001-cfitsio.sh b/etc/hstdp-2019.5/pkgs/001-cfitsio.sh new file mode 100644 index 0000000..719b542 --- /dev/null +++ b/etc/hstdp-2019.5/pkgs/001-cfitsio.sh @@ -0,0 +1,15 @@ +#!/bin/bash -e + +name=cfitsio +version=3440 +url=https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/${name}${version}.tar.gz + +sudo yum install -y libcurl-devel +curl -LO "${url}" +tar xf "$(basename ${url})" + +pushd "${name}" &>/dev/null +./configure --prefix="${PREFIX}" --enable-reentrant +make shared +make install +popd &>/dev/null diff --git a/etc/hstdp-2019.5/pkgs/002-hstcal.sh b/etc/hstdp-2019.5/pkgs/002-hstcal.sh new file mode 100644 index 0000000..f7ef911 --- /dev/null +++ b/etc/hstdp-2019.5/pkgs/002-hstcal.sh @@ -0,0 +1,18 @@ +#!/bin/bash -e +name=hstcal +version=2.3.1 +url="https://github.com/spacetelescope/${name}" + +# Grab a version of WAF that isn't broken +curl -o waf https://waf.io/waf-2.0.12 +chmod +x waf + +git clone "${url}" +pushd "${name}" &>/dev/null + git checkout "${version}" + + # Build / Install + ../waf configure --prefix=${PREFIX} --release-with-symbols --with-cfitsio=${PREFIX} + ../waf build + ../waf install +popd &>/dev/null diff --git a/etc/hstdp-2019.5/tasks/001-packages.sh b/etc/hstdp-2019.5/tasks/001-packages.sh new file mode 100755 index 0000000..e948120 --- /dev/null +++ b/etc/hstdp-2019.5/tasks/001-packages.sh @@ -0,0 +1,43 @@ +#!/bin/bash +set -e +set -x + +prefix="${TOOLCHAIN}" +sysconfdir="${TOOLCHAIN_BUILD}/etc/${PIPELINE}" +reqdir=${sysconfdir}/pkgs +blddir=builds + +export PATH="${prefix}/bin:${PATH}" +export CFLAGS="-I${prefix}/include" +export LDFLAGS="-L${prefix}/lib -Wl,-rpath=${prefix}/lib" +export PREFIX="${prefix}" + +function pre() +{ + if [[ ! -d ${reqdir} ]]; then + # Nothing there, but maybe that's on purpose. + exit 0 + fi + mkdir -p "${blddir}" + pushd ${blddir} &>/dev/null +} + +function build() +{ + pre + # Iterate over binary package build scripts + for req in ${reqdir}/* + do + chmod +x "${req}" + "${req}" + done + post +} + +function post() +{ + popd &>/dev/null + [[ -d ${blddir} ]] && rm -rf "${blddir}" +} + +build diff --git a/etc/hstdp-2019.5/tasks/002-python-packages.sh b/etc/hstdp-2019.5/tasks/002-python-packages.sh new file mode 100755 index 0000000..33714aa --- /dev/null +++ b/etc/hstdp-2019.5/tasks/002-python-packages.sh @@ -0,0 +1,40 @@ +#!/bin/bash +set -e +set -x + +# Uses GLOBAL environment variable: PYTHON_VERSION defined by `docker build` argument +prefix="${TOOLCHAIN}" +sysconfdir="${TOOLCHAIN_BUILD}/etc/${PIPELINE}" +reqdir=${sysconfdir}/pip + +export PATH="${prefix}/bin:${PATH}" +export CFLAGS="-I${prefix}/include" +export LDFLAGS="-L${prefix}/lib -Wl,-rpath=${prefix}/lib" + +function pre() +{ + if [[ ! -d ${reqdir} ]]; then + # Nothing there, but maybe that's on purpose. + exit 0 + fi +} + +function build() +{ + pre + # Iterate over pip requirement files + for req in ${reqdir}/* + do + pip install --upgrade --progress-bar=off -r "${req}" + done + post +} + +function post() +{ + rm -rf ~/.cache/pip + [[ -d src ]] && rm -rf src || true + [[ -f gmon.out ]] && rm -rf gmon.out || true +} + +build diff --git a/etc/hstdp-2019.5/tasks/999-clean.sh b/etc/hstdp-2019.5/tasks/999-clean.sh new file mode 100755 index 0000000..7487b9c --- /dev/null +++ b/etc/hstdp-2019.5/tasks/999-clean.sh @@ -0,0 +1,18 @@ +#!/bin/bash -x +if [[ ! -f /.dockerenv ]]; then + echo "This script cannot be executed outside of a docker container." + exit 1 +fi + +rm -rf "${HOME}/.astropy" +rm -rf "${HOME}/.cache" +rm -rf "${HOME}"/* + +sudo yum clean all +sudo rm -rf /tmp/* +sudo rm -rf /var/cache/yum + +for logfile in /var/log/* +do + sudo truncate --size=0 "${logfile}" +done |