forked from mjohn218/NERDSS
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (35 loc) · 978 Bytes
/
Dockerfile
File metadata and controls
42 lines (35 loc) · 978 Bytes
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
# Use an Intel-based Ubuntu image
FROM --platform=linux/amd64 ubuntu:20.04
# Avoid prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Update and install necessary tools
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
build-essential \
cmake \
git \
gdb \
google-perftools \
libgoogle-perftools-dev \
libgsl-dev \
libopenmpi-dev \
openmpi-bin \
libomp-dev \
&& rm -rf /var/lib/apt/lists/*
# Compile and install Google Test
WORKDIR /usr/src/gtest
RUN git clone https://github.com/google/googletest.git . \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make \
&& make install \
&& cd .. \
&& rm -rf build .git
# Create a new user
RUN useradd -ms /bin/bash myuser
# Create and set ownership of the working directory
RUN mkdir /nerdss_mpi && chown myuser:myuser /nerdss_mpi
# Switch to the new user
USER myuser
# Set up your working directory
WORKDIR /nerdss_mpi