-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.run
50 lines (43 loc) · 1.44 KB
/
Dockerfile.run
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
# This dockerfile provides instructions for creating a docker image which we use for compiling and running
# our croco configurations in the operational system
# It has the official croco source code baked in along with the code from this repo
FROM ubuntu:20.04
# Install dependencies
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install --no-install-recommends --yes \
wget \
unzip \
nco \
gfortran \
build-essential \
mpich \
libmpich-dev \
make \
libnetcdff-dev \
libnetcdf-dev && \
apt-get clean && apt-get autoremove
# bake in the official croco source code
RUN wget --no-check-certificate https://gitlab.inria.fr/croco-ocean/croco/-/archive/v1.3.1/croco-v1.3.1.tar.gz && \
tar -xvzf croco-v1.3.1.tar.gz && \
rm croco-v1.3.1.tar.gz
# bake in the code from our repo
RUN mkdir /somisana-croco
ADD . /somisana-croco
# Add "croco" user and grant sudo permission.
# RUN mkdir -p /etc/sudoers.d
# RUN adduser --shell /bin/bash --disabled-password --gecos "" croco \
# && echo "croco ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/croco \
# && chmod 0440 /etc/sudoers.d/croco
# USER croco
# WORKDIR /home/croco/
# rather setting up the user as Zach did to try and line up with how the somisana user is set up on mims, where we run the model
RUN groupadd -g 1999 runners \
&& useradd \
-u 1003 \
-g 1999 \
-m \
-s /bin/bash \
somisana
USER somisana
WORKDIR /home/somisana