-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-spack-env
More file actions
95 lines (79 loc) · 2.06 KB
/
Copy pathDockerfile-spack-env
File metadata and controls
95 lines (79 loc) · 2.06 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
FROM ubuntu:focal
LABEL maintainer="Lukasz.Kaczmarczyk@glasgow.ac.uk"
# general environment for docker
ENV DEBIAN_FRONTEND=noninteractive \
SPACK_ROOT=/usr/local \
FORCE_UNSAFE_CONFIGURE=1
# timezone env with default
ENV TZ Europe/London
# Confif apt-get
RUN echo 'APT::Install-Recommends "0";' > /etc/apt/apt.conf.d/99local
ENV DEBIAN_FRONTEND=noninteractive
# Install packages
RUN apt-get update && \
apt-get install -y \
file \
zlib1g-dev \
openssh-server \
wget \
valgrind \
curl \
git \
g++ \
gfortran \
gdb \
m4 \
automake \
build-essential \
libtool \
libblas-dev \
liblapack-dev \
libsigsegv2 \
libjpeg-dev \
graphviz \
doxygen \
cmake \
pkg-config \
gnuplot \
ca-certificates \
python3-distutils \
libx11-dev \
xauth \
xterm \
unzip \
mesa-common-dev \
libglu1-mesa-dev \
libxmu-dev \
libxi-dev \
libssl-dev \
gawk \
libopenmpi-dev \
&& rm -rf /var/lib/apt/lists/*
ENV MOFEM_INSTALL_DIR=/mofem_install
ENV SPACK_ROOT_DIR=$MOFEM_INSTALL_DIR/spack
ENV TARGET=x86_64
#ENV TARGET=aarch64
# clone spack
RUN mkdir -p $SPACK_ROOT_DIR && \
curl -s -L https://bitbucket.org/mofem/mofem-spack/get/adeab2cb6d2794148136f639b8825e1fb94d22ce.tar.gz \
| tar xzC $SPACK_ROOT_DIR --strip 1 && \
. $SPACK_ROOT_DIR/share/spack/setup-env.sh && \
echo ". $SPACK_ROOT_DIR/share/spack/setup-env.sh" >> ~/.bashrc && \
spack external find && \
spack install --only dependencies mofem-cephas@lukasz+mgis \
target=$TARGET build_type=Release ^petsc+X ^boost+python+numpy
# image run hook: the -l will make sure /etc/profile environments are loaded
CMD /bin/bash -l
# SSH .ssh dir
RUN mkdir root/.ssh
# Allow to trace child procsses needed for debuging
RUN sed -i 's/kernel.yama.ptrace_scope = 1/kernel.yama.ptrace_scope = 0/' /etc/sysctl.d/10-ptrace.conf
# Create the PrivSep empty dir if necessary
RUN if [ ! -d /var/run/sshd ]; then \
mkdir /var/run/sshd; \
chmod 0755 /var/run/sshd; \
fi
ENV MOFEM_SRC_DIR=$MOFEM_INSTALL_DIR/mofem-cephas
ENV MOFEM_UM_SRC_DIR=$MOFEM_SRC_DIR/mofem/users_modules
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]