-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-gpu
58 lines (45 loc) · 1.7 KB
/
Dockerfile-gpu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Use tensorflow as the base image
FROM ghcr.io/deepmodeling/deepmd-kit:devel_cu11
# Set environment variables
ARG DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1 \
TZ=Etc/UTC \
LANG=en_US.utf8
# Update and install system dependencies
RUN apt-get update && \
apt-get install -y locales && \
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \
apt-get install -y vim curl python3 python3-pip \
libglib2.0-0 libgl1 libegl1 libxkbcommon0 dbus libopengl0 build-essential git \
ccache openmpi-bin libopenmpi-dev cmake libblas-dev liblapack-dev python3.11-venv \
ffmpeg libfftw3-dev && \
rm -rf /var/lib/apt/lists/*
# Set the working directory to /mnt/work
WORKDIR /mnt/work
# Install Python packages without caching (Needed for LLAMPS)
RUN python3 -m pip install --no-cache-dir cython fitsnap3 mpi4py virtualenv
# Clone, build, and install LAMMPS
RUN git clone https://github.com/lammps/lammps.git lammps && \
cd lammps && \
mkdir build && \
cd build && \
cmake ../cmake \
-DBUILD_SHARED_LIBS=yes \
-DMLIAP_ENABLE_PYTHON=yes \
-DPKG_PYTHON=yes \
-DPKG_MANYBODY=yes \
-DPKG_KSPACE=yes \
-DPKG_PHONON=yes \
-DPKG_ML-SNAP=yes \
-DPKG_ML-IAP=yes \
-DPKG_ML-PACE=yes \
-DPKG_SPIN=yes \
-DPYTHON_EXECUTABLE:FILEPATH=$(which python3) && \
make -j $(nproc) && \
make install-python
#Install Kaldo
RUN python3 -m pip install --no-cache-dir git+https://github.com/nanotheorygroup/kaldo
# Install calorine (ASE NEP driver)
RUN python3 -m pip install --no-cache-dir calorine psutil tabulate
# Set the working directory back to the root
WORKDIR /root/