-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.spack-gmds
46 lines (46 loc) · 2.18 KB
/
Dockerfile.spack-gmds
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
#============== OS LAYER ==================
FROM ubuntu:22.04
#==========================================
ARG SPACK_VERSION=0.22.2
# METADATA OF THE IMAGE
LABEL description="GMDS image built with spack" \
version.ubuntu="22.04" \
version.spack=${SPACK_VERSION}
ARG SPACK_VERSION
#==========================================
# Do not use /dev as the HOME if you use containers in vscode
# /dev is too small to store .vscode-server directory containing user preferences
# ENV HOME /dev
#==========================================
SHELL ["/bin/bash", "-c"]
#==========================================
ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
#==========================================
RUN apt update &&\
apt install -y build-essential cmake python3 python3-venv pip unzip zip curl git autoconf wget lcov &&\
apt clean &&\
rm -rf /var/lib/apt/lists/*
#==========================================
RUN wget https://github.com/Kitware/CMake/releases/download/v3.30.5/cmake-3.30.5-linux-x86_64.tar.gz
RUN tar xvf cmake-3.30.5-linux-x86_64.tar.gz
RUN cp -r cmake-3.30.5-linux-x86_64/* /usr/
#==========================================
RUN pip install pytest
#==========================================
RUN git clone --depth=1 -b v${SPACK_VERSION} https://github.com/spack/spack.git &&\
sed -i 's#"{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}"#"{name}"#g' spack/etc/spack/defaults/config.yaml
#==========================================
RUN source ./spack/share/spack/setup-env.sh && \
git clone --depth=1 https://github.com/LIHPC-Computational-Geometry/spack_recipes.git &&\
spack repo add ./spack_recipes/meshing &&\
spack repo add ./spack_recipes/meshing_supersede &&\
spack config --scope site add 'packages:all:target:[x86_64]' &&\
spack compiler find &&\
spack external find cmake
#==========================================
RUN source ./spack/share/spack/setup-env.sh && \
spack install --only dependencies gmds+kmds+blocking+python ^kokkos+openmp ^cgns~mpi ^[email protected]
#==========================================
RUN rm -rf /spack/var/spack/cache/*
#==========================================