Skip to content

Instantly share code, notes, and snippets.

@akkornel
Created May 4, 2017 18:25
Show Gist options
  • Save akkornel/470a46004c9bbe4f38c7d90dd21aa2ea to your computer and use it in GitHub Desktop.
Save akkornel/470a46004c9bbe4f38c7d90dd21aa2ea to your computer and use it in GitHub Desktop.
Bootstrap with all packages and workflow code installed
# vim: ts=4 sw=4 noet
# Stanford Quake Lab bufferbox workflow container bootstrap
BootStrap: yum
OSVersion: 7
MirrorURL: http://yum.stanford.edu/mrepo/centos%{OSVERSION}-x86_64/RPMS.all/
GPG: https://www.centos.org/keys/RPM-GPG-KEY-CentOS-7
Include: perl
%setup
TMPDIR=`mktemp -d`
echo "(Files being downloaded to ${TMPDIR})"
echo 'Downloading and unpacking the workflow software...'
curl -o ${TMPDIR}/quake-bufferbox-workflow.zip 'https://code.stanford.edu/research-computing-public/quake-bufferbox-workflow/repository/archive.zip?ref=release%2F1'
unzip ${TMPDIR}/quake-bufferbox-workflow.zip -d ${TMPDIR}
mkdir ${SINGULARITY_ROOTFS}/workflow
mv ${TMPDIR}/quake-bufferbox-workflow-release*/* ${SINGULARITY_ROOTFS}/workflow/
echo 'Downloading and installing bcl2fastq package...'
curl -o ${TMPDIR}/bcl2fastq.rpm 'https://support.illumina.com/content/dam/illumina-support/documents/downloads/software/bcl2fastq/bcl2fastq2-v2.19.0.316-Linux-x86_64.rpm' || exit 1
rpm --root ${SINGULARITY_ROOTFS} -i ${TMPDIR}/bcl2fastq.rpm
echo 'Downloading and installing EPEL key and release package...'
curl -o ${TMPDIR}/epel-key.gpg 'https://getfedora.org/static/352C64E5.txt'
curl -o ${TMPDIR}/epel-release.rpm -L 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm'
rpm --root ${SINGULARITY_ROOTFS} --import ${TMPDIR}/epel-key.gpg
rpm --root ${SINGULARITY_ROOTFS} -i ${TMPDIR}/epel-release.rpm
echo 'Installing EPEL-based packages'
yum --installroot ${SINGULARITY_ROOTFS} -y install perl-Email-MIME perl-Email-Send
echo 'Cleaning up'
rmdir ${TMPDIR}/quake-bufferbox-workflow-release*
rm ${TMPDIR}/quake-bufferbox-workflow.zip
rm ${TMPDIR}/bcl2fastq.rpm
rm ${TMPDIR}/epel-key.gpg ${TMPDIR}/epel-release.rpm
rmdir ${TMPDIR}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment