Reputation: 1193
I'm very new to the container space and after following some tutorials I'm trying to get my own singularity container up and running.
My recipe is as follows:
BootStrap: debootstrap
OSVersion: trusty
MirrorURL: http://us.archive.ubuntu.com/ubuntu/
%post
#install strelka2.9.2 - these commands get run during the container build stage
apt-get -y --force-yes install wget bzip2 python-dev
wget https://github.com/Illumina/strelka/releases/download/v2.9.2/strelka-2.9.2.centos6_x86_64.tar.bz2
tar xvjf strelka-2.9.2.centos6_x86_64.tar.bz2
%environment
#What to put here to find the strelka-2.9.2.centos6_x86_64/bin/ folder?
I'm trying to figure out how to add the downloaded binary to the executable path. I expected the downloaded files in the post section to show up in the /home/ or similar inside the container, but I can't seem to find them when I shell in with singularity shell myImage.simg
.
Upvotes: 2
Views: 1727
Reputation: 3772
By default, the PATH used in the container is the PATH of the environment you run it from. An easy way to ensure the path is what you want is set: PATH=/path/to/strelka/bin:$PATH
under %environment
.
A simple definition file you can you to quickly play around with:
Bootstrap: docker
From: debian:buster-slim
%environment
PATH=/some/weird/path/bin:$PATH
%runscript
echo "PATH is: $PATH"
Upvotes: 1