-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
66 lines (48 loc) · 2.07 KB
/
Dockerfile
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
FROM bitnami/minideb:jessie
#####EXTRA LABELS#####
LABEL autogen="no" \
software="CESM" \
version="2" \
software.version="2.1.1" \
about.summary="Community Earth System Model" \
base_image="cesm:2.1.1--py37he9b5208_1" \
about.home="VR-CESM" \
about.license="Copyright (c) 2017, University Corporation for Atmospheric Research (UCAR). All rights reserved."
MAINTAINER Anne Fouilloux <annefou@geo.uio.no>
# By default en_US.UTF-8 is not generated, and locale-gen is not installed
# (comes with locales)
# and uncomment the en_US.UTF-8 line from /etc/locale.gen and regenerate
# AF: added svn, csh and wget for CESM B1850 configuration (with ocean)
RUN install_packages libgl1-mesa-glx locales openssh-client procps \
vim csh wget bzip2 ca-certificates curl git subversion && \
sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && locale-gen
ENV LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8
# Install miniconda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -u -p /usr/local && \
rm ~/miniconda.sh && \
/usr/local/bin/conda config --add channels defaults && \
/usr/local/bin/conda config --add channels bioconda && \
/usr/local/bin/conda config --add channels conda-forge && \
/usr/local/bin/conda install cesm && \
/usr/local/bin/conda clean -tipsy && \
ln -s /usr/local/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /usr/local/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "conda activate base" >> ~/.bashrc
RUN ln -s /usr/local/bin/x86_64-conda_cos6-linux-gnu-ar /usr/local/bin/ar
RUN adduser cesm --disabled-password && usermod -aG users cesm
USER cesm
RUN mkdir -p /home/cesm/.cime \
/home/cesm/packages \
/home/cesm/work \
/home/cesm/inputdata \
/home/cesm/archive \
/home/cesm/cases
COPY config_files/* /home/cesm/.cime/
ENV AR=ar
ENV USER=cesm
WORKDIR /home/cesm
COPY run_noresm /home/cesm/
#ENTRYPOINT ./run_noresm
CMD ["/bin/bash"]