-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
79 lines (57 loc) · 2.09 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
FROM ubuntu
MAINTAINER KNMI <[email protected]>
RUN apt-get update && apt-get install -y gfortran \
git \
vim \
apt-utils \
m4 \
wget \
curl
#netcdf libraries
RUN apt-get update && apt-get install -y build-essential \
libhdf5-dev \
netcdf-bin \
netcdf-doc \
libnetcdf-dev \
libblas-dev \
liblapack-dev \
libnetcdff6 \
libnetcdff-dev \
r-base
# work from home or opt?
WORKDIR /home/
# Fortran ClimExp sourche.
# incomplete, edit Makefile.
RUN git clone https://github.com/andrejsim/ClimExp-pyapi.git
# build of climate explorer fortran source.
ENV FORTRAN Fortran
#RUN git clone http://climexp.knmi.nl/Fortran.git
RUN git clone https://github.com/andrejsim/ClimExp-fortran.git ${FORTRAN}
ENV PVM_ARCH build
RUN mkdir -p ${FORTRAN}/${PVM_ARCH}
RUN mkdir -p /nrf
WORKDIR /home/nrf
# moved this library temporarily to git hub, can not locate relevant source online. (Pending)
RUN git clone https://github.com/andrejsim/nrf .
RUN tar -xf nrf.tar
RUN make -f nrf.mk
RUN cp libnr.a ../${FORTRAN}/${PVM_ARCH}
# need to be commited to core repo.
WORKDIR /home/${FORTRAN}
RUN cp /home/ClimExp-pyapi/Makefile.docker ${PVM_ARCH}/Makefile
WORKDIR /home/${FORTRAN}/${PVM_ARCH}
RUN make
# run nc-config --all and compare to Makefile
# docker build . --rm -t cef:test
# docker run -it cef:test
# docker run -v /usr/people/mihajlov:/home/mihajlov -it cef:test
# install python, test and api.
WORKDIR /home/ClimExp-pyapi
RUN apt-get install -y python python-dev python-distribute python-pip
RUN pip install --upgrade pip
RUN pip install scipy numpy pandas netcdf4 xarray datetime pprint
# data is not provided
# download location: http://opendap.knmi.nl/knmi/thredds/dodsC/climate_explorer/
#
# or map with volume:
# docker run -v ~/climexp/DATA/:/root/climexp/DATA/ -it cef