Skip to content

Commit

Permalink
update docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Qianxiang Ma committed Jul 29, 2022
1 parent d7198a2 commit 9ceb12a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
23 changes: 21 additions & 2 deletions scripts/mkl.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
FROM intel/oneapi-basekit
FROM ubuntu

RUN apt update &&\
DEBIAN_FRONTEND=noninteractive apt install -y wget gnupg git gcc g++ make cmake libopenmpi-dev python3 python3-matplotlib &&\
rm -rf /var/lib/apt/lists/*

RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
| gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null

RUN echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list

RUN apt update &&\
DEBIAN_FRONTEND=noninteractive apt install -y intel-oneapi-mkl-devel &&\
rm -rf /var/lib/apt/lists/*
ENV MKLROOT /opt/intel/oneapi/mkl/latest
ENV CMAKE_PREFIX_PATH /opt/intel/oneapi/mkl/latest

RUN apt update && apt upgrade -y && rm -rf /var/lib/apt/lists/*
RUN cd /root &&\
git clone https://github.com/rioyokotalab/nbd.git &&\
mkdir ./nbd/build &&\
cd ./nbd/build &&\
cmake .. &&\
cmake --build .

ENV OMPI_ALLOW_RUN_AS_ROOT 1
ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM 1
ENV OMPI_MCA_btl_vader_single_copy_mechanism none
ENV LD_LIBRARY_PATH /opt/intel/oneapi/mkl/latest/lib/intel64
9 changes: 5 additions & 4 deletions scripts/openblas.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
FROM debian
FROM ubuntu

RUN apt update &&\
apt upgrade -y &&\
apt install -y wget git gcc g++ make cmake libopenmpi-dev python3 python3-matplotlib &&\
DEBIAN_FRONTEND=noninteractive apt install -y wget gnupg git gcc g++ make cmake libopenmpi-dev python3 python3-matplotlib &&\
rm -rf /var/lib/apt/lists/*

RUN cd /root &&\
Expand All @@ -11,6 +10,9 @@ RUN cd /root &&\
make -j -C OpenBLAS-0.3.20 all install NUM_THREADS=16 DYNAMIC_ARCH=1 PREFIX=/opt/OpenBLAS &&\
rm -rf OpenBLAS-0.3.20 OpenBLAS-0.3.20.tar.gz

ENV OPENBLAS_DIR /opt/OpenBLAS
ENV CMAKE_PREFIX_PATH /opt/OpenBLAS

RUN cd /root &&\
git clone https://github.com/rioyokotalab/nbd.git &&\
mkdir ./nbd/build &&\
Expand All @@ -22,5 +24,4 @@ ENV OMPI_ALLOW_RUN_AS_ROOT 1
ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM 1
ENV OMPI_MCA_btl_vader_single_copy_mechanism none
ENV OPENBLAS_NUM_THREADS 1
ENV OPENBLAS_DIR /opt/OpenBLAS
ENV LD_LIBRARY_PATH /opt/OpenBLAS/lib

0 comments on commit 9ceb12a

Please sign in to comment.