Last active
August 17, 2020 17:23
-
-
Save vsoch/502267875c330ab37571bc532061edfc to your computer and use it in GitHub Desktop.
Singularity image with anaconda + R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone -b development https://www.github.com/singularityware/singularity.git | |
cd singularity | |
./autogen.sh | |
./configure --prefix=/usr/local | |
make | |
sudo make install | |
cd $HOME #or wherever you want :) | |
singularity create --size 8000 rpython.img | |
sudo singularity bootstrap rpython.img Singularity | |
# Then run | |
./rpython.img | |
null device | |
1 | |
# test.jpg in $PWD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From:rocker/ropensci | |
Bootstrap:docker | |
%environment | |
PATH=$PATH:/opt/anaconda3/bin | |
export PATH | |
%runscript | |
Rscript /code/runman.R | |
%post | |
apt-get update && | |
apt-get -y install git bzip2 | |
wget https://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh | |
bash Anaconda3-4.2.0-Linux-x86_64.sh -b -p /opt/anaconda3 | |
echo "PATH=/opt/anaconda3/bin:\$PATH" >> $HOME/.bashrc | |
echo "export PATH" >> $HOME/.bashrc | |
rm Anaconda3-4.2.0-Linux-x86_64.sh | |
. $HOME/.bashrc | |
/opt/anaconda3/bin/conda install -c r r-essentials | |
mkdir /code | |
cat << EOF > /code/runman.R | |
jpeg("test.jpg") | |
hist(c(1, 4, 1, 4, 5, 6, 7, 1, 3, 5, 2)) | |
dev.off() | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment