小康文章阅读笔记

小康文章阅读笔记

自用Docker一览

如下是我自用的一些Docker

1. gromacs-GPU Docker

自写gromacs Docker,CUDA版本12.1,gromacs版本 gromacs-2024.5

可从此下载:Dockerfile

# Use an official Ubuntu base image
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04

# Set environment variables to avoid interactive prompts during installation
ENV DEBIAN_FRONTEND=noninteractive

# Install dependencies
RUN apt-get update && && apt-get upgrade -y && apt-get install -y \
    libgomp1 \
    liblapack3 \
    openmpi-common \
    build-essential \
    cmake \
    python3 \
    wget \
    openmpi-bin \
    libopenmpi-dev \
    && apt-get clean && rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /usr/local/src

RUN echo "export OMPI_ALLOW_RUN_AS_ROOT=1" >> ~/.bashrc && \
    echo "export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1" >> ~/.bashrc  && \
    source ~/.bashrc

# Download and install GROMACS
RUN wget https://ftp.gromacs.org/gromacs/gromacs-2024.5.tar.gz && \
    tar xfz gromacs-2024.5.tar.gz && \
    cd gromacs-2024.5 && \
    mkdir build && cd build && \
    cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=CUDA -DGMX_MPI=on && \
    make -j$(nproc) && make install && \
    cd ../.. && rm -rf gromacs-2024.5*


# Source GROMACS
RUN echo "source /usr/local/gromacs/bin/GMXRC" >> ~/.bashrc

# Set entrypoint
# ENTRYPOINT ["gmx"]