@@ -5,42 +5,32 @@ RUN apt-get update && apt-get install -y \
55 libcereal-dev libxc-dev libgtest-dev libgmock-dev
66
77# Following steps by https://software.intel.com/content/www/us/en/develop/documentation/installation-guide-for-intel-oneapi-toolkits-linux/top/installation/install-using-package-managers/apt.html .
8- RUN cd /tmp && \
9- wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB && \
10- apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB && \
11- rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB && \
12- echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
13-
14- # To save disk space, only install the required components, but not the whole intel-hpckit.
15- RUN apt-get update --allow-unauthenticated && \
16- apt-get install -y --no-install-recommends \
17- intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic \
8+ RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
9+ | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \
10+ echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \
11+ | sudo tee /etc/apt/sources.list.d/oneAPI.list
12+
13+ # To save disk space, only install the essential components, but not the whole toolkit.
14+ RUN apt-get update && \
15+ apt-get install -y \
16+ intel-oneapi-compiler-dpcpp-cpp \
1817 intel-oneapi-compiler-fortran \
1918 intel-oneapi-mkl-devel \
2019 intel-oneapi-mpi-devel \
2120 intel-oneapi-vtune
2221
23- # These environment variables are the most essential part generated by `source /opt/intel/oneapi/setvars.sh`.
24- # It is recommended to do it again if this docker image is used for development.
25- ENV I_MPI_ROOT='/opt/intel/oneapi/mpi/latest' \
26- LIBRARY_PATH=/opt/intel/oneapi/tbb/latest/env/../lib/intel64/gcc4.8:/opt/intel/oneapi/mpi/latest/libfabric/lib:/opt/intel/oneapi/mpi/latest/lib/release:/opt/intel/oneapi/mpi/latest/lib:/opt/intel/oneapi/mkl/latest/lib/intel64:/opt/intel/oneapi/compiler/latest/linux/compiler/lib/intel64_lin:/opt/intel/oneapi/compiler/latest/linux/lib \
27- LD_LIBRARY_PATH=/opt/intel/oneapi/tbb/latest/env/../lib/intel64/gcc4.8:/opt/intel/oneapi/mpi/latest/libfabric/lib:/opt/intel/oneapi/mpi/latest/lib/release:/opt/intel/oneapi/mpi/latest/lib:/opt/intel/oneapi/mkl/latest/lib/intel64:/opt/intel/oneapi/debugger/10.1.2/gdb/intel64/lib:/opt/intel/oneapi/debugger/10.1.2/libipt/intel64/lib:/opt/intel/oneapi/debugger/10.1.2/dep/lib:/opt/intel/oneapi/compiler/latest/linux/lib:/opt/intel/oneapi/compiler/latest/linux/lib/x64:/opt/intel/oneapi/compiler/latest/linux/lib/emu:/opt/intel/oneapi/compiler/latest/linux/compiler/lib/intel64_lin \
28- PATH=/opt/intel/oneapi/vtune/latest/bin64:/opt/intel/oneapi/mpi/latest/libfabric/bin:/opt/intel/oneapi/mpi/latest/bin:/opt/intel/oneapi/mkl/latest/bin/intel64:/opt/intel/oneapi/dev-utilities/latest/bin:/opt/intel/oneapi/debugger/10.1.2/gdb/intel64/bin:/opt/intel/oneapi/compiler/latest/linux/bin/intel64:/opt/intel/oneapi/compiler/latest/linux/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
29- MKLROOT='/opt/intel/oneapi/mkl/latest' \
30- FI_PROVIDER_PATH='/opt/intel/oneapi/mpi/latest/libfabric/lib/prov:/usr/lib64/libfabric' \
31- CMAKE_PREFIX_PATH='/opt/intel/oneapi/vpl/latest:/opt/intel/oneapi/tbb/latest/env/..:/opt/intel/oneapi/dnnl/latest/cpu_dpcpp_gpu_dpcpp/../lib/cmake:/opt/intel/oneapi/dal/latest:/opt/intel/oneapi/compiler/latest/linux/IntelDPCPP' \
32- CMPLR_ROOT='/opt/intel/oneapi/compiler/latest'
33-
34- ENV CC=mpiicc CXX=mpiicpc FC=mpiifort
35-
22+ RUN echo "source /opt/intel/oneapi/setvars.sh" >> ${HOME}/.bashrc
3623SHELL ["/bin/bash", "-c"]
24+ ENV CC=mpiicx CXX=mpiicpx FC=mpiifx
25+
26+ # https://elpa.mpcdf.mpg.de/software/tarball-archive/ELPA_TARBALL_ARCHIVE.html
3727RUN source /opt/intel/oneapi/setvars.sh && \
3828 cd /tmp && \
39- ELPA_VER=2021.05.002 && \
29+ ELPA_VER=2022.11.001 && \
4030 wget -q https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/$ELPA_VER/elpa-$ELPA_VER.tar.gz && \
4131 tar xzf elpa-$ELPA_VER.tar.gz && rm elpa-$ELPA_VER.tar.gz && \
4232 cd elpa-$ELPA_VER && mkdir build && cd build && \
43- ../configure FCFLAGS="-qmkl=cluster" --enable-openmp && \
33+ ../configure CFLAGS="-O3 -march=native" FCFLAGS="-O3 -qmkl=cluster" --enable-openmp && \
4434 make -j`nproc` && \
4535 make PREFIX=/usr/local install && \
4636 ln -s /usr/local/include/elpa_openmp-$ELPA_VER/elpa /usr/local/include/ && \
@@ -50,16 +40,16 @@ RUN wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-wit
5040 --no-check-certificate --quiet -O libtorch.zip && \
5141 unzip -q libtorch.zip -d /opt && rm libtorch.zip
5242
53- ENV CMAKE_PREFIX_PATH=/opt/libtorch/share/cmake \
54- I_MPI_CXX=icpx
43+ ENV CMAKE_PREFIX_PATH=/opt/libtorch/share/cmake
5544
5645ADD https://api.github.com/repos/deepmodeling/abacus-develop/git/refs/heads/develop /dev/null
5746
58- RUN git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \
47+ RUN source /opt/intel/oneapi/setvars.sh && \
48+ git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \
5949 cd abacus-develop && \
6050 cmake -B build -DENABLE_DEEPKS=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON && \
6151 cmake --build build -j`nproc` && \
6252 cmake --install build && \
6353 rm -rf build && \
64- cd ..
54+ abacus --version
6555 #&& rm -rf abacus-develop
0 commit comments