Skip to content

Commit

Permalink
Make build line on #104 more flexible.
Browse files Browse the repository at this point in the history
Adding ninja to the installed apps so that biodynamo will build with all available threads. More flexible and generalisable.
  • Loading branch information
BJackal authored Jan 18, 2022
1 parent fa3c07c commit 57ea262
Showing 1 changed file with 29 additions and 13 deletions.
42 changes: 29 additions & 13 deletions Singularity
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
Bootstrap:docker
From:ubuntu:18.04

%environment

%post -c /bin/bash

export DEBIAN_FRONTEND=noninteractive
export TZ=Etc/UTC
export TZ=Europe/Berlin

apt-get -y update &&
apt-get -y install python &&
apt-get -y install python3 &&
Expand All @@ -23,9 +27,7 @@ From:ubuntu:18.04
apt-get -y install aptitude &&
aptitude -y install libreadline-dev &&
apt-get -y install libssl-dev &&
# Add -y to the following line
apt-get -y install libsqlite3-dev &&
# Add -y to the following line
apt-get -y install apt-utils &&
apt-get -y install openmpi-bin &&
apt-get -y install libopenmpi-dev &&
Expand Down Expand Up @@ -62,44 +64,58 @@ From:ubuntu:18.04
apt-get -y install zlib1g-dev &&
apt-get -y install sudo &&
apt-get -y install software-properties-common

apt-get -y install locales locales-all
dpkg-reconfigure locales
locale-gen

wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -f -p /miniconda3/
rm Miniconda3-latest-Linux-x86_64.sh

export PATH="/miniconda3/bin:$PATH"
conda install -y -c conda-forge pip numpy
conda update -y --all
apt -y install git
apt -y install curl
sudo rm -rf ~/.pyenv
sudo rm -rf ~/.pyenv
curl https://pyenv.run | bash
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
eval "$(pyenv init -)"
export PYENV_ROOT=/opt/pyenv

export PYENV_ROOT="/opt/pyenv"
export PATH="/opt/pyenv/bin:$PATH"
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
## Remove -y from following line
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.9.1
export PATH=/opt/pyenv/versions/3.9.1/bin:$PATH
export PATH=/opt/pyenv/versions/3.9.1/bin/:$PATH
export PATH="/opt/pyenv/versions/3.9.1/bin:$PATH"
export PATH="/opt/pyenv/versions/3.9.1/bin/:$PATH"

wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py
python3 -m pip install -U pip
python3 -m pip install --upgrade pip
python3 -m pip install numpy
apt-get install -y python3-pip
apt-get install -y freeglut3-dev valgrind

pip install cmake --upgrade
pyenv global 3.9.1

apt-get -y dist-upgrade
sudo apt-get -y install ninja-build

git clone https://github.com/BioDynaMo/biodynamo.git
cd biodynamo
export SILENT_INSTALL=1
./prerequisites.sh all
mkdir build
cd build
cmake ..
make -j8
## cd build

cmake -G Ninja \
-Dparaview=OFF \
-DCMAKE_BUILD_TYPE=Release \
-B build

cmake --build build --parallel -config Release

%runscript

0 comments on commit 57ea262

Please sign in to comment.