-
Notifications
You must be signed in to change notification settings - Fork 114
/
Dockerfile.intel
46 lines (37 loc) · 1.72 KB
/
Dockerfile.intel
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
# ----------------------------------------------------------------------
# Build ED2 model
# ----------------------------------------------------------------------
FROM intel/oneapi-hpckit:2023.1.0-devel-ubuntu22.04 AS build
# Some variables that can be used to set control the docker build
ARG ED2_KIND=E
# environment variables controlling the build
ENV ED2_KIND=${ED2_KIND}
# compile HDF5 with intel
RUN wget -q https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.9/src/CMake-hdf5-1.10.9.tar.gz && \
tar xf CMake-hdf5-1.10.9.tar.gz && \
cd CMake-hdf5-1.10.9 && \
sed -e 's/^#*\(.*BUILD_FORTRAN:BOOL=ON.*\)/\1/' \
-e 's/^#*\(.*BUILD_FORTRAN:BOOL=OFF.*\)/#\1/' \
-e 's/^#*\(.*intel.cmake.*\)/\1/' \
-i HDF5options.cmake && \
ctest -S HDF5config.cmake,BUILD_GENERATOR=Unix,INSTALLDIR=/opt/hdf5 -C Release -V -O hdf5.log && \
./HDF5-1.10.9-Linux.sh --skip-license --exclude-subdir --prefix=/opt && \
cd && \
rm -rf CMake-hdf5-1.10.9.tar.gz CMake-hdf5-1.10.9
# copy the source only, this prevents a full rebuild in case of changes to Dockerfile or non source files
COPY BRAMS /ED2/BRAMS
COPY ED /ED2/ED
COPY EDR /ED2/EDR
COPY RAPP /ED2/RAPP
COPY Ramspost /ED2/Ramspost
WORKDIR /ED2/ED/build
RUN ./install.sh -k ${ED2_KIND} -g -p docker.intel
RUN if [ -e ed_*-opt ]; then mv ed_*-opt ed2; else mv ed_*-dbg ed2; fi
########################################################################
# ----------------------------------------------------------------------
# Minimal image with just ED2 model
# ----------------------------------------------------------------------
FROM ubuntu:22.04
WORKDIR /data
COPY --from=build /ED2/ED/build/ed2 /usr/bin
CMD ["/usr/bin/ed2"]