-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7e48d4
commit c19e603
Showing
5 changed files
with
171 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# ----------------------------------------------------------------------------- | ||
# | ||
# Copyright (C) 2021 CERN & University of Surrey for the benefit of the | ||
# BioDynaMo collaboration. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# | ||
# See the LICENSE file distributed with this work for details. | ||
# See the NOTICE file distributed with this work for additional information | ||
# regarding copyright ownership. | ||
# | ||
# ----------------------------------------------------------------------------- | ||
|
||
FROM almalinux:9.3 | ||
|
||
# workaround for https://github.com/containers/buildah/issues/1046 | ||
RUN echo "" >> /etc/hosts && cat /etc/hosts && yum -y install setup | ||
|
||
# man required by ROOT | ||
# mesa-dri-drivers: OpenGL driver (software renderer) | ||
RUN dnf update -y && dnf install -y \ | ||
git \ | ||
sudo \ | ||
man \ | ||
wget \ | ||
xorg-x11-server-Xvfb \ | ||
mesa-dri-drivers | ||
|
||
RUN git config --system user.name "Test User" && \ | ||
git config --system user.email [email protected] | ||
|
||
# update user id and group id such that mapped volumes can be accessed with the | ||
# same rights as on the host. Files created by the container can also be | ||
# accessed on the host without chowning. | ||
ARG HOST_UID | ||
ARG HOST_GID | ||
|
||
RUN groupadd -g $HOST_GID testuser && \ | ||
useradd -u $HOST_UID -g $HOST_GID -m -c "Testuser" testuser && \ | ||
passwd --delete testuser && \ | ||
echo "testuser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | ||
|
||
USER testuser | ||
|
||
# preserve the environment variable BDM_LOCAL_LFS when calling scripts with | ||
# sudo | ||
RUN echo "Defaults env_keep += \"BDM_LOCAL_LFS\"" | sudo tee -a /etc/sudoers | ||
|
||
# the OpenGL capabilities can be incorrectly detected -> override version | ||
# https://python.develop-bugs.com/article/10118323/paraview+needs+higher+OpenGL+in+Mesa | ||
ENV MESA_GL_VERSION_OVERRIDE=3.3 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
doxygen | ||
graphviz | ||
libxml2-devel | ||
fontconfig-devel | ||
fontconfig | ||
freetype | ||
freetype-devel | ||
llvm-toolset-7 | ||
llvm-toolset-7-clang-tools-extra | ||
llvm-toolset-7-llvm-devel | ||
llvm-toolset-7-llvm-static | ||
valgrind | ||
gsl-devel | ||
atlas-devel |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
cmake | ||
git | ||
wget | ||
ninja-build | ||
bzip2-devel | ||
freeglut-devel | ||
libXext-devel | ||
libXt-devel | ||
libXpm-devel | ||
libXft-devel | ||
numactl-devel | ||
openmpi-devel | ||
zlib-devel | ||
lapack-devel | ||
blas-devel | ||
|
||
readline-devel | ||
sqlite-devel | ||
openssl-devel | ||
xz-devel | ||
libffi-devel | ||
findutils | ||
patch |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
#!/bin/bash | ||
# ----------------------------------------------------------------------------- | ||
# | ||
# Copyright (C) 2021 CERN & University of Surrey for the benefit of the | ||
# BioDynaMo collaboration. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# | ||
# See the LICENSE file distributed with this work for details. | ||
# See the NOTICE file distributed with this work for additional information | ||
# regarding copyright ownership. | ||
# | ||
# ----------------------------------------------------------------------------- | ||
|
||
# This script installs the required packages | ||
if [[ $# -ne 1 ]]; then | ||
echo "ERROR: Wrong number of arguments. | ||
Description: | ||
This script installs the prerequisites of BioDynaMo, but not BioDynaMo | ||
itself. Script install.sh installs both prerequisites and BioDynaMo. | ||
Arguments: | ||
<install_type> all/required. If all is specified, then this script | ||
will install all the prerequisites." | ||
exit 1 | ||
fi | ||
|
||
BDM_PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../.." | ||
|
||
sudo -v | ||
|
||
sudo dnf update -y | ||
|
||
# Install required packages | ||
sudo dnf -y --enablerepo=crb install \ | ||
$(cat $BDM_PROJECT_DIR/util/installation/almalinux-9.3/package_list_required) | ||
|
||
if [ -n "${PYENV_ROOT}" ]; then | ||
unset PYENV_ROOT | ||
fi | ||
|
||
# If PyEnv is not installed, install it | ||
if [ ! -f "$HOME/.pyenv/bin/pyenv" ]; then | ||
echo "PyEnv was not found. Installing now..." | ||
curl https://pyenv.run | bash | ||
fi | ||
export PYENV_ROOT="$HOME/.pyenv" | ||
export PATH="$PYENV_ROOT/bin:$PATH" | ||
eval "$(pyenv init --path)" | ||
eval "$(pyenv init -)" | ||
pyenv update | ||
|
||
PYVERS=3.9.1 | ||
|
||
# If Python $PYVERS is not installed, install it | ||
if [ ! -f "$HOME/.pyenv/versions/$PYVERS/lib/libpython3.so" ]; then | ||
echo "Python $PYVERS was not found. Installing now..." | ||
/usr/bin/env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install -f $PYVERS | ||
fi | ||
pyenv shell $PYVERS | ||
|
||
# Install optional packages | ||
if [ $1 == "all" ]; then | ||
python -m pip install --upgrade pip | ||
PIP_PACKAGES="markupsafe==2.0.1 nbformat jupyter metakernel jupyterlab nbformat==5.4.0 nbconvert==6.5.3 nbclient==0.6.6" | ||
# Don't install --user: the packages should end up in the PYENV_ROOT directory | ||
python -m pip install $PIP_PACKAGES | ||
# SBML integration | ||
#sudo bash -c 'cat << EOF > /etc/yum.repos.d/springdale-7-SCL.repo | ||
#[SCL-core] | ||
#name=Springdale SCL Base 7.6 - x86_64 | ||
#mirrorlist=http://springdale.princeton.edu/data/springdale/SCL/7.6/x86_64/mirrorlist | ||
##baseurl=http://springdale.princeton.edu/data/springdale/SCL/7.6/x86_64 | ||
#gpgcheck=1 | ||
#gpgkey=http://springdale.math.ias.edu/data/puias/7.6/x86_64/os/RPM-GPG-KEY-puias | ||
#EOF' | ||
sudo dnf -y --enablerepo=crb install --nogpgcheck \ | ||
$(cat $BDM_PROJECT_DIR/util/installation/almalinux-9.3/package_list_extra) | ||
fi | ||
|
||
exit 0 |