Skip to content
Snippets Groups Projects
Commit 25efae95 authored by Quang tru HUYNH's avatar Quang tru HUYNH
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
Pipeline #151251 passed
build:
image: docker:24
stage: build
before_script:
- i=0; while [ "$i" -lt 12 ]; do docker info && break; sleep 5; i=$(( i + 1 )) ; done
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- export MY_TIME=`date +"%F-%H%M"`
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME" -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" -t "$CI_REGISTRY_IMAGE:latest" -t "$CI_REGISTRY_IMAGE:$MY_TIME" --build-arg="BUILD_OPTIONS=$OPTIONS" -f ./Dockerfile .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME"
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA"
- docker push "$CI_REGISTRY_IMAGE:latest"
- docker push "$CI_REGISTRY_IMAGE:main"
- docker push "$CI_REGISTRY_IMAGE:$MY_TIME"
FROM debian:12
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN <<EOF bash
set -ex
# pulled from SIngularity recipe:
apt-get update
DEBIAN_FRONTEND=noninteractive \
apt-get install -y wget cmake python3-numpy python3-setuptools doxygen swig cython3 software-properties-common git jq python3-pip openmpi-bin libopenmpi-dev
mkdir /opt/cuda-toolkit
cd /opt/cuda-toolkit
## CUDA
wget -q https://developer.download.nvidia.com/compute/cuda/12.8.0/local_installers/cuda-repo-debian12-12-8-local_12.8.0-570.86.10-1_amd64.deb
dpkg -i cuda-repo-debian12-12-8-local_12.8.0-570.86.10-1_amd64.deb && \
rm cuda-repo-debian12-12-8-local_12.8.0-570.86.10-1_amd64.deb
cp /var/cuda-repo-debian12-12-8-local/cuda-*-keyring.gpg /usr/share/keyrings/
add-apt-repository contrib
apt-get update
apt-get -y install cuda-toolkit-12-8
## OPENMM
export OPENMM_VERSION=8.2.0
mkdir /opt/openmm
cd /opt/openmm
wget -q -O - https://github.com/openmm/openmm/archive/refs/tags/\${OPENMM_VERSION}.tar.gz| tar xzf -
cd openmm-\${OPENMM_VERSION}
pwd # /opt/openmm/openmm-\${OPENMM_VERSION}
mkdir build
cd build
cmake ..
# workaround compiler internal error
[ -f platforms/cuda/sharedTarget/CMakeFiles/OpenMMCUDA.dir/flags.make ] && \
sed -i -e 's/-O3/-O2/g' platforms/cuda/sharedTarget/CMakeFiles/OpenMMCUDA.dir/flags.make
make -j 24 && make install
python3 -m pip config set global.break-system-packages true
make PythonInstall
python3 -m pip config set global.break-system-packages false
python3 -m openmm.testInstallation
## PLUMED
cd /opt
wget -O - https://github.com/plumed/plumed2/releases/download/v2.9.3/plumed-2.9.3.tgz | tar xzf -
cd plumed-2.9.3
./configure
make -j 24 && make install
## OPENMM-PLUMED
cd /usr/bin
ln -s python3 python
#ln -s pip3 pip
cd /opt
git clone https://github.com/openmm/openmm-plumed
cd openmm-plumed/
mkdir build
cd build/
cmake ..
# workaround compiler internal error
[ -f platforms/cuda/sharedTarget/CMakeFiles/OpenMMCUDA.dir/flags.make ] && \
sed -i -e 's/-O3/-O2/g' platforms/cuda/sharedTarget/CMakeFiles/OpenMMCUDA.dir/flags.make
make -j 24 && make install
python3 -m pip config set global.break-system-packages true
make PythonInstall
python3 -m pip config set global.break-system-packages false
apt-get autoremove
apt-get autoclean
apt-get clean
# cleanup cuda sources
rm -r /var/cuda-repo-debian12-12-8-local /etc/apt/sources.list.d//cuda-debian12-12-8-local.list
# cleanup build
rm -rf /opt/openmm /opt/plumed-2.9.3
#%environment
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/openmm/lib:$LD_LIBRARY_PATH
EOF
This diff is collapsed.
# building a debian 12 based openmpi openMM+plumed+cuda (docker-debian12-openmpi-openmm-8.2.0-cuda-12.8-plumed-2.9.3)
[![pipeline status](https://gitlab.pasteur.fr/tru/docker-debian12-openmpi-openmm-8.2.0-cuda-12.8-plumed-2.9.3/badges/main/pipeline.svg)](https://gitlab.pasteur.fr/tru/docker-debian12-openmpi-openmm-8.2.0-cuda-12.8-plumed-2.9.3/-/commits/main)
Tru <tru@pasteur.fr>
(toy) docker image produced available at `registry-gitlab.pasteur.fr/tru/docker-debian12-openmpi-openmm-8.2.0-cuda-12.8-plumed-2.9.3:latest`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment