-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc: Split Dockerfile.cpu into .cpu and .intel
- Loading branch information
1 parent
cff2c7a
commit 213d3a6
Showing
5 changed files
with
116 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# syntax=docker/dockerfile:1 | ||
############################################################## | ||
# This Dockerfile contains the Intel OneAPI toolkit for Devito | ||
############################################################## | ||
|
||
# Base image | ||
FROM ubuntu:22.04 as base | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Install python | ||
RUN apt-get update && \ | ||
apt-get install -y dh-autoreconf python3-venv python3-dev python3-pip | ||
|
||
# Install for basic base not containing it | ||
RUN apt-get install -y vim wget git flex libnuma-dev tmux \ | ||
numactl hwloc curl \ | ||
autoconf libtool build-essential procps | ||
|
||
# Install tmpi | ||
RUN curl https://raw.githubusercontent.com/Azrael3000/tmpi/master/tmpi -o /usr/local/bin/tmpi | ||
|
||
# Install OpenGL library, necessary for the installation of GemPy | ||
RUN apt-get install -y libgl1-mesa-glx | ||
|
||
RUN apt-get clean && apt-get autoclean && apt-get autoremove -y && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
EXPOSE 8888 | ||
CMD ["/bin/bash"] | ||
|
||
############################################################## | ||
# Intel OneAPI standard image | ||
############################################################## | ||
FROM base as oneapi | ||
|
||
# Download the key to system keyring | ||
# https://www.intel.com/content/www/us/en/develop/documentation/installation-guide-for-intel-oneapi-toolkits-linux/top/installation/install-using-package-managers/apt.html#apt | ||
RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor > /usr/share/keyrings/oneapi-archive-keyring.gpg | ||
RUN echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" > /etc/apt/sources.list.d/oneAPI.list | ||
|
||
# Intel advisor and drivers | ||
RUN apt-get update -y && \ | ||
# advisor | ||
apt-get install -y intel-oneapi-advisor | ||
|
||
# Drivers mandatory for intel gpu | ||
# https://dgpu-docs.intel.com/installation-guides/ubuntu/ubuntu-focal.html#ubuntu-20-04-focal | ||
RUN wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor > /usr/share/keyrings/intel-graphics.gpg | ||
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu focal main" > /etc/apt/sources.list.d/intel.list | ||
|
||
RUN apt-get update -y && apt-get dist-upgrade -y && \ | ||
apt-get install -y intel-opencl-icd intel-level-zero-gpu level-zero level-zero-dev \ | ||
intel-media-va-driver-non-free libmfx1 libmfxgen1 libvpl2 \ | ||
libigc-dev intel-igc-cm libigdfcl-dev libigfxcmrt-dev level-zero-dev | ||
|
||
############################################################## | ||
# ICC image | ||
# This is a legacy setup that is not built anymore but kept for reference | ||
############################################################## | ||
FROM oneapi as icc | ||
|
||
RUN apt-get update -y && apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-mpi-devel && \ | ||
apt-get clean && apt-get autoclean && apt-get autoremove -y && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Devito config | ||
ENV DEVITO_ARCH="icc" | ||
ENV DEVITO_LANGUAGE="openmp" | ||
ENV DEVITO_PLATFORM="intel64" | ||
# MPICC compiler for mpi4py | ||
ENV MPICC=mpiicc | ||
ENV MPI4PY_FLAGS='. /opt/intel/oneapi/setvars.sh && CFLAGS="-cc=icc"' | ||
|
||
############################################################## | ||
# ICX OpenMP image | ||
############################################################## | ||
FROM oneapi as icx | ||
|
||
RUN apt-get update -y && apt-get install -y intel-oneapi-compiler-dpcpp-cpp intel-oneapi-mpi-devel && \ | ||
apt-get clean && apt-get autoclean && apt-get autoremove -y && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Devito config | ||
ENV DEVITO_ARCH="icx" | ||
ENV DEVITO_LANGUAGE="openmp" | ||
# MPICC compiler for mpi4py | ||
ENV MPICC=mpiicc | ||
ENV MPI4PY_FLAGS='. /opt/intel/oneapi/setvars.sh && CFLAGS="-cc=icx"' | ||
|
||
############################################################## | ||
# ICX SYCL CPU image | ||
############################################################## | ||
FROM icx as cpu-sycl | ||
|
||
# Devito config | ||
ENV DEVITO_ARCH="sycl" | ||
ENV DEVITO_LANGUAGE="sycl" | ||
ENV DEVITO_PLATFORM="intel64" | ||
|
||
############################################################## | ||
# ICX SYCL GPU image | ||
############################################################## | ||
FROM icx as gpu-sycl | ||
|
||
# Devito config | ||
ENV DEVITO_ARCH="sycl" | ||
ENV DEVITO_LANGUAGE="sycl" | ||
ENV DEVITO_PLATFORM="intelgpuX" |