Skip to content

Commit

Permalink
singularity container
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasrausch committed Feb 29, 2024
1 parent 7f81499 commit 504b94a
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
7 changes: 7 additions & 0 deletions singularity/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
You can build a [sansa](https://github.com/dellytools/sansa) singularity container (SIF file) using

`sudo singularity build sansa.sif sansa.def`

Once you have built the container you can run analysis using

`singularity exec sansa.sif sansa --help`
44 changes: 44 additions & 0 deletions singularity/sansa.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Build image
BootStrap: library
From: ubuntu:22.04
Stage: build

%post
apt-get -y update
apt-get install -y autoconf build-essential cmake g++ gfortran git libcurl4-gnutls-dev hdf5-tools libboost-date-time-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libboost-iostreams-dev libbz2-dev libhdf5-dev libncurses-dev liblzma-dev zlib1g-dev libdeflate-dev
apt-get clean
rm -rf /var/lib/apt/lists/*
cd /opt
git clone --recursive https://github.com/dellytools/sansa.git
cd /opt/sansa/
make STATIC=1 all
make install


# Final image
BootStrap: library
From: alpine:latest
Stage: final

%files from build
/opt/sansa/bin/sansa /bin/sansa

%post
SANSAVERSION=`./bin/sansa --version`
echo "export SANSAVERSION=\"${SANSAVERSION}\"" >> $SINGULARITY_ENVIRONMENT
CREATEDATE=`date`
echo "export CREATEDATE=\"${CREATEDATE}\"" >> $SINGULARITY_ENVIRONMENT

%environment
export PATH=/bin:$PATH

%runscript
sansa

%labels
Singularity definition file version v0.0.1

%help
This is a container running sansa.
You can run sansa on files inside the directory where you start
the container, i.e.: singularity exec sansa.sif sansa --help

0 comments on commit 504b94a

Please sign in to comment.