#!/usr/bin/env bash
source ec2pinit.inc.sh
# Update system packages
# Install additional packages
if (( $HAVE_DNF )) || (( $HAVE_YUM )); then
sys_pkg_install \
gcc \
bzip2-devel \
curl \
gcc \
gcc-c++ \
gcc-gfortran \
git \
glibc-devel \
kernel-devel \
libX11-devel \
mesa-libGL \
mesa-libGLU \
ncurses-devel \
openssh-server \
subversion \
sudo \
wget \
zlib-devel \
xauth \
xterm
elif (( $HAVE_APT )); then
sys_pkg_install \
build-essential \
gcc \
bzip2 \
curl \
gcc \
g++ \
gfortran \
git \
libc6-dev \
libx11-dev \
libgl1-mesa-dri \
libgl1-mesa-glx \
libglu1-mesa \
libncurses5-dev \
openssh-server \
subversion \
sudo \
wget \
zlib1g-dev \
xauth \
xterm
fi
# "become" the target user
miniconda_root=$HOME/miniconda3
miniconda_version="py39_4.11.0"
export CFLAGS="-std=gnu99"
# Install miniconda
mc_install "$miniconda_version" "$miniconda_root" ||
true
# Install HST pipeline
# Install JWST pipeline
# Handle recently introduced packaging bug 05/2022 (old upstream tag deleted)
sed --follow-symlinks -i 's/hsluv.*/hsluv==5.0.3/' $ac_releases_path/de/f
mc_initialize(dest)
Configures user account to load conda at login.
mc_install(version, dest)
Installs Miniconda3.
ac_releases_install_hst(version)
Install the HST pipeline.
ac_releases_install_jwst(version)
Install the JWST pipeline.
sys_user_push(name)
Lazily "become" another user.
sys_pkg_update_all()
Update all system packages.