Skip to content

Instantly share code, notes, and snippets.

@akkornel
Last active April 16, 2017 22:49
Show Gist options
  • Save akkornel/324ee7ffbf1a82e1d4eebf4943189d60 to your computer and use it in GitHub Desktop.
Save akkornel/324ee7ffbf1a82e1d4eebf4943189d60 to your computer and use it in GitHub Desktop.
Bootstrap file with RPM package install
# 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 unzip
%setup
TMPDIR=`mktemp -d`
echo 'Downloading the workflow software...'
curl -o ${SINGULARITY_ROOTFS}/tmp/quake-bufferbox-workflow.zip 'https://code.stanford.edu/research-computing-public/quake-bufferbox-workflow/repository/archive.zip?ref=release%2F1'
echo 'Downloading bcl2fastq package...'
curl -o ${TMPDIR}/bcl2fastq2-v2.19.0.316-Linux-x86_64.rpm 'https://support.illumina.com/content/dam/illumina-support/documents/downloads/software/bcl2fastq/bcl2fastq2-v2.19.0.316-Linux-x86_64.rpm' || exit 1
echo 'Installing bcl2fastq...'
rpm --root=${SINGULARITY_ROOTFS} -i ${TMPDIR}/bcl2fastq2-v2.19.0.316-Linux-x86_64.rpm
rm ${TMPDIR}/bcl2fastq2-v2.19.0.316-Linux-x86_64.rpm
rmdir ${TMPDIR}
%post
echo 'Unpacking and moving workflow software...'
mkdir /workflow
unzip /tmp/quake-bufferbox-workflow.zip
mv quake-bufferbox-workflow-release*/* /workflow/
echo 'Removing workflow archive...'
rmdir quake-bufferbox-workflow-release*
rm /tmp/quake-bufferbox-workflow.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment