forked from deepmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.intel
More file actions
59 lines (53 loc) · 2.82 KB
/
Copy pathDockerfile.intel
File metadata and controls
59 lines (53 loc) · 2.82 KB
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
58
59
FROM intel/oneapi-hpckit:2025.2.2-0-devel-ubuntu22.04
RUN apt-get update && apt-get install -y \
bc cmake git gnupg gcc g++ python3-numpy sudo wget vim unzip \
libcereal-dev libxc-dev libgtest-dev libgmock-dev libbenchmark-dev \
pkg-config build-essential autoconf automake libtool ca-certificates && \
rm -rf /var/lib/apt/lists/*
ENV CC="mpiicx"
ENV CXX="mpiicpx"
ENV FC="mpiifx"
# https://elpa.mpcdf.mpg.de/software/tarball-archive/ELPA_TARBALL_ARCHIVE.html
RUN cd /tmp && \
ELPA_VER=2022.11.001 && \
wget -q https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/$ELPA_VER/elpa-$ELPA_VER.tar.gz && \
tar xzf elpa-$ELPA_VER.tar.gz && rm elpa-$ELPA_VER.tar.gz && \
cd elpa-$ELPA_VER && mkdir build && cd build && \
../configure CFLAGS="-O3 -march=native" FCFLAGS="-O3 -qmkl=cluster" --enable-openmp && \
make -j $(nproc) && \
make PREFIX=/usr/local install && \
ln -s /usr/local/include/elpa_openmp-$ELPA_VER/elpa /usr/local/include/ && \
cd /tmp && rm -rf elpa-$ELPA_VER
# RapidJSON
RUN cd /tmp && \
wget --quiet https://codeload.github.com/Tencent/rapidjson/tar.gz/24b5e7a -O rapidjson-24b5e7a.tar.gz && \
tar -xzf rapidjson-24b5e7a.tar.gz && cd rapidjson-24b5e7a && \
cmake -B build -DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF && \
cmake --build build --target install && \
cd /tmp && rm -r rapidjson-24b5e7a rapidjson-24b5e7a.tar.gz
# LibTorch (Note: Using pre-built Torch library with MKL might cause issues)
RUN wget -q https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.0%2Bcpu.zip -O /tmp/libtorch.zip && \
unzip -q /tmp/libtorch.zip -d /opt && rm -f /tmp/libtorch.zip
ENV CMAKE_PREFIX_PATH=/opt/libtorch/share/cmake:${CMAKE_PREFIX_PATH}
# Clone and build abacus (optional during image build; keep for CI image)
ADD https://api.github.com/repos/deepmodeling/abacus-develop/git/refs/heads/develop /dev/null
RUN cd /tmp && git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \
cd abacus-develop && \
cmake -B build \
-DENABLE_MLALGO=ON \
-DENABLE_LIBXC=ON \
-DENABLE_LIBRI=ON \
-DENABLE_RAPIDJSON=ON \
-DCMAKE_BUILD_TYPE=Release && \
cmake --build build -j $(nproc) && \
cmake --install build && \
(/usr/local/bin/abacus --version || echo "ABACUS installed but version check failed") && \
rm -rf /tmp/abacus-develop
# -DMKL_SYCL=OFF \
# -DMKL_SYCL_DISTRIBUTED_DFT:BOOL=OFF \
# cd /tmp && wget https://github.com/deepmodeling/abacus-develop/archive/refs/tags/v3.9.0.17.zip -O abacus-develop-3.9.0.17.zip && \
# unzip abacus-develop-3.9.0.17.zip && \
# cd abacus-develop-3.9.0.17 && \
# sed -i '3i\#include "source_estate/elecstate_lcao.h"' source/source_lcao/edm.cpp && \
# Default entry
CMD ["/bin/bash"]