summaryrefslogtreecommitdiff
path: root/etc/jwstdp-latest
diff options
context:
space:
mode:
Diffstat (limited to 'etc/jwstdp-latest')
-rw-r--r--etc/jwstdp-latest/pip/001-setuptools2
-rw-r--r--etc/jwstdp-latest/pip/002-testing6
-rw-r--r--etc/jwstdp-latest/pip/003-prerequisites4
-rw-r--r--etc/jwstdp-latest/pip/004-pipeline17
-rw-r--r--etc/jwstdp-latest/pkgs/000-jwst-depends.sh6
-rw-r--r--etc/jwstdp-latest/pkgs/001-cfitsio.sh15
-rw-r--r--etc/jwstdp-latest/pkgs/002-fitsverify.sh16
-rwxr-xr-xetc/jwstdp-latest/tasks/001-packages.sh43
-rwxr-xr-xetc/jwstdp-latest/tasks/002-python-packages.sh40
-rwxr-xr-xetc/jwstdp-latest/tasks/999-clean.sh18
10 files changed, 167 insertions, 0 deletions
diff --git a/etc/jwstdp-latest/pip/001-setuptools b/etc/jwstdp-latest/pip/001-setuptools
new file mode 100644
index 0000000..648f70c
--- /dev/null
+++ b/etc/jwstdp-latest/pip/001-setuptools
@@ -0,0 +1,2 @@
+setuptools>=40.0
+wheel
diff --git a/etc/jwstdp-latest/pip/002-testing b/etc/jwstdp-latest/pip/002-testing
new file mode 100644
index 0000000..09a415e
--- /dev/null
+++ b/etc/jwstdp-latest/pip/002-testing
@@ -0,0 +1,6 @@
+nose==1.3.7
+pytest>=4.0.0
+pytest-xdist>=1.24.1
+pytest-astropy>=0.5.0
+pytest-virtualenv>=1.3.0
+requests_mock
diff --git a/etc/jwstdp-latest/pip/003-prerequisites b/etc/jwstdp-latest/pip/003-prerequisites
new file mode 100644
index 0000000..8ac5fe9
--- /dev/null
+++ b/etc/jwstdp-latest/pip/003-prerequisites
@@ -0,0 +1,4 @@
+Cython
+numpy>=1.15.2
+relic>=1.1.2
+git+https://github.com/astropy/astropy.git#egg=astropy
diff --git a/etc/jwstdp-latest/pip/004-pipeline b/etc/jwstdp-latest/pip/004-pipeline
new file mode 100644
index 0000000..72e47d0
--- /dev/null
+++ b/etc/jwstdp-latest/pip/004-pipeline
@@ -0,0 +1,17 @@
+namedlist>=1.7
+parsley>=1.3
+pymssql>=2.1.4
+jplephem>=2.7
+scipy
+git+https://github.com/astropy/photutils.git#egg=photutils
+git+https://github.com/spacetelescope/asdf.git#egg=asdf
+git+https://github.com/spacetelescope/crds.git#egg=crds
+git+https://github.com/spacetelescope/drizzle.git#egg=drizzle
+git+https://github.com/spacetelescope/gwcs.git#egg=gwcs
+git+https://github.com/spacetelescope/stsci.image.git#egg=stsci.image
+git+https://github.com/spacetelescope/stsci.stimage.git#egg=stsci.stimage
+git+https://github.com/spacetelescope/stsci.imagestats.git#egg=stsci.imagestats
+git+https://github.com/spacetelescope/stsci.tools.git#egg=stsci.tools
+git+https://github.com/spacetelescope/spherical_geometry.git#egg=spherical_geometry
+git+https://github.com/spacetelescope/verhawk.git#egg=verhawk
+git+https://github.com/spacetelescope/jwst.git#egg=jwst
diff --git a/etc/jwstdp-latest/pkgs/000-jwst-depends.sh b/etc/jwstdp-latest/pkgs/000-jwst-depends.sh
new file mode 100644
index 0000000..88cc61e
--- /dev/null
+++ b/etc/jwstdp-latest/pkgs/000-jwst-depends.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+deps=(
+ freetds
+ unixodbc
+)
+sudo yum install -y ${deps[@]}
diff --git a/etc/jwstdp-latest/pkgs/001-cfitsio.sh b/etc/jwstdp-latest/pkgs/001-cfitsio.sh
new file mode 100644
index 0000000..719b542
--- /dev/null
+++ b/etc/jwstdp-latest/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/jwstdp-latest/pkgs/002-fitsverify.sh b/etc/jwstdp-latest/pkgs/002-fitsverify.sh
new file mode 100644
index 0000000..3469f3d
--- /dev/null
+++ b/etc/jwstdp-latest/pkgs/002-fitsverify.sh
@@ -0,0 +1,16 @@
+#!/bin/bash -e
+
+name=fitsverify
+version=4.19
+url=https://heasarc.gsfc.nasa.gov/docs/software/ftools/${name}/${name}-${version}.tar.gz
+
+curl -LO "${url}"
+tar xf "$(basename ${url})"
+
+pushd "${name}" &>/dev/null
+gcc -o ${name} ftverify.c fvrf_data.c fvrf_file.c fvrf_head.c \
+ fvrf_key.c fvrf_misc.c -DSTANDALONE -I${TOOLCHAIN_INCLUDE} \
+ -L${TOOLCHAIN_LIB} -Wl,-rpath=${TOOLCHAIN_LIB} -lcfitsio -lm -lnsl
+
+install -m 755 -t "${TOOLCHAIN_BIN}" ${name}
+popd &>/dev/null
diff --git a/etc/jwstdp-latest/tasks/001-packages.sh b/etc/jwstdp-latest/tasks/001-packages.sh
new file mode 100755
index 0000000..e948120
--- /dev/null
+++ b/etc/jwstdp-latest/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/jwstdp-latest/tasks/002-python-packages.sh b/etc/jwstdp-latest/tasks/002-python-packages.sh
new file mode 100755
index 0000000..3d89b6a
--- /dev/null
+++ b/etc/jwstdp-latest/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
+ [[ -f gmon.out ]] && rm -rf gmon.out
+}
+
+build
diff --git a/etc/jwstdp-latest/tasks/999-clean.sh b/etc/jwstdp-latest/tasks/999-clean.sh
new file mode 100755
index 0000000..7487b9c
--- /dev/null
+++ b/etc/jwstdp-latest/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