From 2119eeef5d80ae1c14fdd1c45a9d81908ce14e3d Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 4 Dec 2018 16:22:46 -0500 Subject: Initial commit --- etc/hstdp-2018.3a/pip/001-setuptools | 0 etc/hstdp-2018.3a/pip/002-testing | 5 +++ etc/hstdp-2018.3a/pip/003-prerequisites | 3 ++ etc/hstdp-2018.3a/pip/004-pipeline | 26 ++++++++++++++++ etc/hstdp-2018.3a/pkgs/000-dummy.sh | 2 ++ etc/hstdp-2018.3a/pkgs/001-cfitsio.sh | 15 +++++++++ etc/hstdp-2018.3a/pkgs/002-hstcal.sh | 16 ++++++++++ etc/hstdp-2018.3a/tasks/001-python-packages.sh | 40 ++++++++++++++++++++++++ etc/hstdp-2018.3a/tasks/002-packages.sh | 43 ++++++++++++++++++++++++++ etc/hstdp-2018.3a/tasks/999-clean.sh | 18 +++++++++++ 10 files changed, 168 insertions(+) create mode 100644 etc/hstdp-2018.3a/pip/001-setuptools create mode 100644 etc/hstdp-2018.3a/pip/002-testing create mode 100644 etc/hstdp-2018.3a/pip/003-prerequisites create mode 100644 etc/hstdp-2018.3a/pip/004-pipeline create mode 100644 etc/hstdp-2018.3a/pkgs/000-dummy.sh create mode 100644 etc/hstdp-2018.3a/pkgs/001-cfitsio.sh create mode 100644 etc/hstdp-2018.3a/pkgs/002-hstcal.sh create mode 100755 etc/hstdp-2018.3a/tasks/001-python-packages.sh create mode 100755 etc/hstdp-2018.3a/tasks/002-packages.sh create mode 100755 etc/hstdp-2018.3a/tasks/999-clean.sh (limited to 'etc/hstdp-2018.3a') diff --git a/etc/hstdp-2018.3a/pip/001-setuptools b/etc/hstdp-2018.3a/pip/001-setuptools new file mode 100644 index 0000000..e69de29 diff --git a/etc/hstdp-2018.3a/pip/002-testing b/etc/hstdp-2018.3a/pip/002-testing new file mode 100644 index 0000000..c4b2c9d --- /dev/null +++ b/etc/hstdp-2018.3a/pip/002-testing @@ -0,0 +1,5 @@ +nose==1.3.7 +pytest==4.0.0 +pytest-xdist==1.24.1 +pytest-astropy==0.5.0 +pytest-virtualenv==1.3.0 diff --git a/etc/hstdp-2018.3a/pip/003-prerequisites b/etc/hstdp-2018.3a/pip/003-prerequisites new file mode 100644 index 0000000..fcc1c48 --- /dev/null +++ b/etc/hstdp-2018.3a/pip/003-prerequisites @@ -0,0 +1,3 @@ +numpy==1.15.2 +astropy==3.0.4 +relic==1.1.2 diff --git a/etc/hstdp-2018.3a/pip/004-pipeline b/etc/hstdp-2018.3a/pip/004-pipeline new file mode 100644 index 0000000..bd8265b --- /dev/null +++ b/etc/hstdp-2018.3a/pip/004-pipeline @@ -0,0 +1,26 @@ +parsley==1.3 +d2to1==0.2.12 +stsci.convolve==2.2.2 +stsci.imagestats==1.5.3 +stsci.stimage==0.2.2 +crds==7.2.6 +pysynphot==0.9.12 +git+https://github.com/spacetelescope/reftools.git@1.7.4#egg=reftools +spherical-geometry==1.2.4 +stregion==1.1.4 +stsci.ndimage==0.10.3 +stsci.sphere==0.2 +stsci.tools==3.4.13 +git+https://github.com/spacetelescope/acstools.git@2.0.10#egg=acstools +calcos==3.3.4 +fitsblender==0.3.2 +git+https://github.com/spacetelescope/nictools.git@1.1.3#egg=nictools +stistools==1.1 +stsci.image==2.3.0 +stsci.imagemanip==1.1.4 +stwcs==1.4.0 +wfc3tools==1.3.4 +git+https://github.com/spacetelescope/wfpc2tools.git@1.0.3#egg=wfpc2tools +git+https://github.com/spacetelescope/costools.git@1.2.2#egg=costools +git+https://github.com/spacetelescope/stsci.skypac@0.9.15#egg=stsci.skypac +git+https://github.com/spacetelescope/drizzlepac@2.2.4#egg=drizzlepac diff --git a/etc/hstdp-2018.3a/pkgs/000-dummy.sh b/etc/hstdp-2018.3a/pkgs/000-dummy.sh new file mode 100644 index 0000000..06bd986 --- /dev/null +++ b/etc/hstdp-2018.3a/pkgs/000-dummy.sh @@ -0,0 +1,2 @@ +#!/bin/bash +exit 0 diff --git a/etc/hstdp-2018.3a/pkgs/001-cfitsio.sh b/etc/hstdp-2018.3a/pkgs/001-cfitsio.sh new file mode 100644 index 0000000..719b542 --- /dev/null +++ b/etc/hstdp-2018.3a/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-2018.3a/pkgs/002-hstcal.sh b/etc/hstdp-2018.3a/pkgs/002-hstcal.sh new file mode 100644 index 0000000..8b4ab4f --- /dev/null +++ b/etc/hstdp-2018.3a/pkgs/002-hstcal.sh @@ -0,0 +1,16 @@ +#!/bin/bash -e +name=hstcal +version=2.2.0 +url="https://github.com/spacetelescope/${name}" + +git clone "${url}" +pushd "${name}" &>/dev/null + # Grab a version of WAF that isn't broken + curl -o waf https://waf.io/waf-2.0.12 + chmod +x waf + + # Build / Install + ./waf configure --prefix=${PREFIX} --release-with-symbols --with-cfitsio=${PREFIX} + ./waf build + ./waf install +popd &>/dev/null diff --git a/etc/hstdp-2018.3a/tasks/001-python-packages.sh b/etc/hstdp-2018.3a/tasks/001-python-packages.sh new file mode 100755 index 0000000..3d89b6a --- /dev/null +++ b/etc/hstdp-2018.3a/tasks/001-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 + [[ -f gmon.out ]] && rm -rf gmon.out +} + +build diff --git a/etc/hstdp-2018.3a/tasks/002-packages.sh b/etc/hstdp-2018.3a/tasks/002-packages.sh new file mode 100755 index 0000000..e948120 --- /dev/null +++ b/etc/hstdp-2018.3a/tasks/002-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-2018.3a/tasks/999-clean.sh b/etc/hstdp-2018.3a/tasks/999-clean.sh new file mode 100755 index 0000000..7487b9c --- /dev/null +++ b/etc/hstdp-2018.3a/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 -- cgit