diff --git a/Dockerfile.gromacs b/Dockerfile.gromacs index 39ea516..0eaf629 100755 --- a/Dockerfile.gromacs +++ b/Dockerfile.gromacs @@ -1,194 +1,194 @@ -# syntax=docker/dockerfile:1 -# NOTE: Building this image require's docker version >= 23.0. -# -# For reference: -# - https://docs.docker.com/build/dockerfile/frontend/#stable-channel -ARG TAG_VERSION="12.4.1" -FROM nvidia/cuda:${TAG_VERSION}-cudnn-devel-ubuntu22.04 -ARG HTTP_PROXY -ARG HTTPS_PROXY -ENV http_proxy=${HTTP_PROXY} -ENV https_proxy=${HTTPS_PROXY} -ARG DEBIAN_FRONTEND="noninteractive" -ENV DEBIAN_FRONTEND=${DEBIAN_FRONTEND} -ARG ROOT_PASSWD="root" -ENV ROOT_PASSWD=${ROOT_PASSWD} -ENV SSH_PORT=2222 -WORKDIR /root -SHELL ["/bin/bash", "-c"] - -# base tools -RUN < ~/.ssh/config -cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak -sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config -sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config -sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config -sed -i 's/^\(\s*\)GSSAPIAuthentication yes/\1GSSAPIAuthentication no/' /etc/ssh/ssh_config -sed -i "s/^#Port 22/Port ${SSH_PORT}/" /etc/ssh/sshd_config -sudo sed -i "s/# Port 22/Port ${SSH_PORT}/" /etc/ssh/ssh_config -ssh-keygen -t rsa -b 4096 -f /root/.ssh/id_rsa -N "" <<< y -cat ~/.ssh/id_rsa.pub >> ~/.ssh/auth -cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys -cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys2 -chmod 600 /root/.ssh/authorized_keys -chmod 600 /root/.ssh/authorized_keys2 -mkdir /var/run/sshd -echo "root:${ROOT_PASSWD}" | chpasswd -mkdir -p ~/.pip -# install pixi -curl -fsSL https://pixi.sh/install.sh | bash -EOT - -ARG FFTW_VERSION="3.3.10" -ENV FFTW_VERSION=${FFTW_VERSION} -ENV PATH=/usr/local/fftw:$PATH -# 安装fftw -RUN < ./test_mpi_cuda.cu -#include -#include -#include - -__global__ void hello_cuda() { - printf("Hello from CUDA kernel! Thread id: %d\n", threadIdx.x); -} - -int main(int argc, char **argv) { - MPI_Init(&argc, &argv); - - int rank; - MPI_Comm_rank(MPI_COMM_WORLD, &rank); - - printf("Hello from MPI process %d!\n", rank); - - // Launch CUDA kernel - hello_cuda<<<1, 10>>>(); - cudaDeviceSynchronize(); // Wait for the CUDA kernel to finish - - MPI_Finalize(); - return 0; -} -EOF -nvcc -o test_mpi_cuda test_mpi_cuda.cu -I${CUDA_HOME}/include -I${MPI_HOME}/include -L${MPI_HOME}/lib -lcudart -lmpi -# mpirun --allow-run-as-root -np 2 ./test_mpi_cuda -EOT - -# 安装plumed -ARG PLUMED_VERSION="2.9.2" -ENV PLUMED_VERSION=${PLUMED_VERSION} -ENV LD_LIBRARY_PATH=/usr/local/plumed/lib:$LD_LIBRARY_PATH -ENV PATH=/usr/local/plumed:/usr/local/plumed/bin:$PATH -RUN <> /root/.bashrc -EOT - -# PyAutoFEP install support version: GROMACS 2021.7 -# GROMACS 2022.5 和 2023 中遇到的“排除原子距离超过截断距离”的问题,确保模拟的稳定性和自由能计算的收敛性。 -# https://github.com/luancarvalhomartins/PyAutoFEP/blob/master/docs/Manual.pdf -# https://github.com/luancarvalhomartins/PyAutoFEP/tree/master/docs/tutorial01 -ENV CPLUS_INCLUDE_PATH=/usr/include/openbabel3 -ENV LIBRARY_PATH=/usr/lib:/usr/local/lib:${LIBRARY_PATH} -RUN <2.0,<3.0" alchemlyb==0.6.0 pymbar==3.0.5 openbabel>3.0.0 matplotlib numpy biopython mdanalysis pytest packaging -# or openbabel use 2.4.1 -git clone https://github.com/luancarvalhomartins/PyAutoFEP.git -EOT - -RUN <= 23.0. +# +# For reference: +# - https://docs.docker.com/build/dockerfile/frontend/#stable-channel +ARG TAG_VERSION="12.4.1" +FROM nvidia/cuda:${TAG_VERSION}-cudnn-devel-ubuntu22.04 +ARG HTTP_PROXY +ARG HTTPS_PROXY +ENV http_proxy=${HTTP_PROXY} +ENV https_proxy=${HTTPS_PROXY} +ARG DEBIAN_FRONTEND="noninteractive" +ENV DEBIAN_FRONTEND=${DEBIAN_FRONTEND} +ARG ROOT_PASSWD="root" +ENV ROOT_PASSWD=${ROOT_PASSWD} +ENV SSH_PORT=2222 +WORKDIR /root +SHELL ["/bin/bash", "-c"] + +# base tools +RUN < ~/.ssh/config +cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak +sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config +sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config +sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config +sed -i 's/^\(\s*\)GSSAPIAuthentication yes/\1GSSAPIAuthentication no/' /etc/ssh/ssh_config +sed -i "s/^#Port 22/Port ${SSH_PORT}/" /etc/ssh/sshd_config +sudo sed -i "s/# Port 22/Port ${SSH_PORT}/" /etc/ssh/ssh_config +ssh-keygen -t rsa -b 4096 -f /root/.ssh/id_rsa -N "" <<< y +cat ~/.ssh/id_rsa.pub >> ~/.ssh/auth +cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys +cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys2 +chmod 600 /root/.ssh/authorized_keys +chmod 600 /root/.ssh/authorized_keys2 +mkdir /var/run/sshd +echo "root:${ROOT_PASSWD}" | chpasswd +mkdir -p ~/.pip +# install pixi +curl -fsSL https://pixi.sh/install.sh | bash +EOT + +ARG FFTW_VERSION="3.3.10" +ENV FFTW_VERSION=${FFTW_VERSION} +ENV PATH=/usr/local/fftw:$PATH +# 安装fftw +RUN < ./test_mpi_cuda.cu +#include +#include +#include + +__global__ void hello_cuda() { + printf("Hello from CUDA kernel! Thread id: %d\n", threadIdx.x); +} + +int main(int argc, char **argv) { + MPI_Init(&argc, &argv); + + int rank; + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + + printf("Hello from MPI process %d!\n", rank); + + // Launch CUDA kernel + hello_cuda<<<1, 10>>>(); + cudaDeviceSynchronize(); // Wait for the CUDA kernel to finish + + MPI_Finalize(); + return 0; +} +EOF +nvcc -o test_mpi_cuda test_mpi_cuda.cu -I${CUDA_HOME}/include -I${MPI_HOME}/include -L${MPI_HOME}/lib -lcudart -lmpi +# mpirun --allow-run-as-root -np 2 ./test_mpi_cuda +EOT + +# 安装plumed +ARG PLUMED_VERSION="2.9.2" +ENV PLUMED_VERSION=${PLUMED_VERSION} +ENV LD_LIBRARY_PATH=/usr/local/plumed/lib:$LD_LIBRARY_PATH +ENV PATH=/usr/local/plumed:/usr/local/plumed/bin:$PATH +RUN <> /root/.bashrc +EOT + +# PyAutoFEP install support version: GROMACS 2021.7 +# GROMACS 2022.5 和 2023 中遇到的“排除原子距离超过截断距离”的问题,确保模拟的稳定性和自由能计算的收敛性。 +# https://github.com/luancarvalhomartins/PyAutoFEP/blob/master/docs/Manual.pdf +# https://github.com/luancarvalhomartins/PyAutoFEP/tree/master/docs/tutorial01 +ENV CPLUS_INCLUDE_PATH=/usr/include/openbabel3 +ENV LIBRARY_PATH=/usr/lib:/usr/local/lib:${LIBRARY_PATH} +RUN <2.0,<3.0" alchemlyb==0.6.0 pymbar==3.0.5 openbabel>3.0.0 matplotlib numpy biopython mdanalysis pytest packaging +# or openbabel use 2.4.1 +git clone https://github.com/luancarvalhomartins/PyAutoFEP.git +EOT + +RUN <= 23.0. -# -# For reference: -# - https://docs.docker.com/build/dockerfile/frontend/#stable-channel -ARG TAG_VERSION="12.4.1" -FROM nvidia/cuda:${TAG_VERSION}-cudnn-devel-ubuntu22.04 -ARG HTTP_PROXY -ARG HTTPS_PROXY -ENV http_proxy=${HTTP_PROXY} -ENV https_proxy=${HTTPS_PROXY} -ARG DEBIAN_FRONTEND="noninteractive" -ENV DEBIAN_FRONTEND=${DEBIAN_FRONTEND} -ARG ROOT_PASSWD="root" -ENV ROOT_PASSWD=${ROOT_PASSWD} -ENV SSH_PORT=2222 -WORKDIR /root -SHELL ["/bin/bash", "-c"] - -# base tools -RUN < ~/.ssh/config -cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak -sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config -sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config -sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config -sed -i 's/^\(\s*\)GSSAPIAuthentication yes/\1GSSAPIAuthentication no/' /etc/ssh/ssh_config -sed -i "s/^#Port 22/Port ${SSH_PORT}/" /etc/ssh/sshd_config -sudo sed -i "s/# Port 22/Port ${SSH_PORT}/" /etc/ssh/ssh_config -ssh-keygen -t rsa -b 4096 -f /root/.ssh/id_rsa -N "" <<< y -cat ~/.ssh/id_rsa.pub >> ~/.ssh/auth -cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys -cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys2 -chmod 600 /root/.ssh/authorized_keys -chmod 600 /root/.ssh/authorized_keys2 -mkdir /var/run/sshd -echo "root:${ROOT_PASSWD}" | chpasswd -mkdir -p ~/.pip -# install pixi -curl -fsSL https://pixi.sh/install.sh | bash -EOT - -ARG FFTW_VERSION="3.3.10" -ENV FFTW_VERSION=${FFTW_VERSION} -ENV PATH=/usr/local/fftw:$PATH -# 安装fftw -RUN < ./test_mpi_cuda.cu -#include -#include -#include - -__global__ void hello_cuda() { - printf("Hello from CUDA kernel! Thread id: %d\n", threadIdx.x); -} - -int main(int argc, char **argv) { - MPI_Init(&argc, &argv); - - int rank; - MPI_Comm_rank(MPI_COMM_WORLD, &rank); - - printf("Hello from MPI process %d!\n", rank); - - // Launch CUDA kernel - hello_cuda<<<1, 10>>>(); - cudaDeviceSynchronize(); // Wait for the CUDA kernel to finish - - MPI_Finalize(); - return 0; -} -EOF -nvcc -o test_mpi_cuda test_mpi_cuda.cu -I${CUDA_HOME}/include -I${MPI_HOME}/include -L${MPI_HOME}/lib -lcudart -lmpi -# mpirun --allow-run-as-root -np 2 ./test_mpi_cuda -EOT - -# 安装plumed -ARG PLUMED_VERSION="2.9.1" -ENV PLUMED_VERSION=${PLUMED_VERSION} -ENV LD_LIBRARY_PATH=/usr/local/plumed/lib:$LD_LIBRARY_PATH -ENV PATH=/usr/local/plumed:/usr/local/plumed/bin:$PATH -RUN <> /root/.bashrc -EOT - -COPY file/Amber24.tar.bz2 file/AmberTools24.tar.bz2 /root - -ENV DOWNLOAD_MINICONDA="False" -# install ambertools -RUN <= 23.0. +# +# For reference: +# - https://docs.docker.com/build/dockerfile/frontend/#stable-channel +ARG TAG_VERSION="12.4.1" +FROM nvidia/cuda:${TAG_VERSION}-cudnn-devel-ubuntu22.04 +ARG HTTP_PROXY +ARG HTTPS_PROXY +ENV http_proxy=${HTTP_PROXY} +ENV https_proxy=${HTTPS_PROXY} +ARG DEBIAN_FRONTEND="noninteractive" +ENV DEBIAN_FRONTEND=${DEBIAN_FRONTEND} +ARG ROOT_PASSWD="root" +ENV ROOT_PASSWD=${ROOT_PASSWD} +ENV SSH_PORT=2222 +WORKDIR /root +SHELL ["/bin/bash", "-c"] + +# base tools +RUN < ~/.ssh/config +cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak +sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config +sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config +sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config +sed -i 's/^\(\s*\)GSSAPIAuthentication yes/\1GSSAPIAuthentication no/' /etc/ssh/ssh_config +sed -i "s/^#Port 22/Port ${SSH_PORT}/" /etc/ssh/sshd_config +sudo sed -i "s/# Port 22/Port ${SSH_PORT}/" /etc/ssh/ssh_config +ssh-keygen -t rsa -b 4096 -f /root/.ssh/id_rsa -N "" <<< y +cat ~/.ssh/id_rsa.pub >> ~/.ssh/auth +cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys +cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys2 +chmod 600 /root/.ssh/authorized_keys +chmod 600 /root/.ssh/authorized_keys2 +mkdir /var/run/sshd +echo "root:${ROOT_PASSWD}" | chpasswd +mkdir -p ~/.pip +# install pixi +curl -fsSL https://pixi.sh/install.sh | bash +EOT + +ARG FFTW_VERSION="3.3.10" +ENV FFTW_VERSION=${FFTW_VERSION} +ENV PATH=/usr/local/fftw:$PATH +# 安装fftw +RUN < ./test_mpi_cuda.cu +#include +#include +#include + +__global__ void hello_cuda() { + printf("Hello from CUDA kernel! Thread id: %d\n", threadIdx.x); +} + +int main(int argc, char **argv) { + MPI_Init(&argc, &argv); + + int rank; + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + + printf("Hello from MPI process %d!\n", rank); + + // Launch CUDA kernel + hello_cuda<<<1, 10>>>(); + cudaDeviceSynchronize(); // Wait for the CUDA kernel to finish + + MPI_Finalize(); + return 0; +} +EOF +nvcc -o test_mpi_cuda test_mpi_cuda.cu -I${CUDA_HOME}/include -I${MPI_HOME}/include -L${MPI_HOME}/lib -lcudart -lmpi +# mpirun --allow-run-as-root -np 2 ./test_mpi_cuda +EOT + +# 安装plumed +ARG PLUMED_VERSION="2.9.1" +ENV PLUMED_VERSION=${PLUMED_VERSION} +ENV LD_LIBRARY_PATH=/usr/local/plumed/lib:$LD_LIBRARY_PATH +ENV PATH=/usr/local/plumed:/usr/local/plumed/bin:$PATH +RUN <> /root/.bashrc +EOT + +COPY file/Amber24.tar.bz2 file/AmberTools24.tar.bz2 /root + +ENV DOWNLOAD_MINICONDA="False" +# install ambertools +RUN <