This repository has been archived by the owner on Oct 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
138 lines (121 loc) · 3.58 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
## Katana is built on a ubuntu 18.04 image
FROM ubuntu:18.04
MAINTAINER Micah Sandusky <[email protected]>
## create a working directory
RUN mkdir -p /code \
&& mkdir -p /code/katana \
&& mkdir -p /packages \
&& mkdir -p /packages/wind
####################################################
## System requirements
####################################################
RUN echo 'Etc/UTC' > /etc/timezone \
&& ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime \
&& apt-get update -y \
&& apt-get install -y build-essential man \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends libblas-dev \
git \
cmake \
liblapack-dev \
libatlas-base-dev \
libffi-dev \
libssl-dev \
gfortran \
libyaml-dev \
libfreetype6-dev \
libpng-dev \
# libhdf5-serial-dev \
python3-dev \
python3-pip \
python3-tk \
curl \
libeccodes-dev \
libeccodes-tools \
# more for windninja
libfontconfig1-dev \
libcurl4-gnutls-dev \
libnetcdf-dev \
qt4-dev-tools \
libqtwebkit-dev \
libboost-program-options-dev \
libboost-date-time-dev \
libgeos-dev \
libboost-test-dev \
wget \
# end windninja
&& cd /code \
&& curl -L ftp://ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/wgrib2.tgz | tar xz \
&& curl -L https://github.com/firelab/windninja/archive/3.5.0.tar.gz | tar xz \
&& mv windninja-3.5.0 windninja \
&& mv windninja /packages/wind \
&& rm -rf /var/lib/apt/lists/* \
&& apt remove -y curl \
&& apt autoremove -y
####################################################
## Wind Ninja
####################################################
ENV PREFIX=/usr/local
ENV POPPLER="poppler-0.23.4"
ENV PROJ="proj-4.8.0"
ENV GDAL="gdal-2.0.3"
ENV WNSCRIPTS="/packages/wind/depends"
## get code and packages
Run cd /packages/wind \
&& mkdir $WNSCRIPTS \
&& cd $WNSCRIPTS \
&& wget http://poppler.freedesktop.org/$POPPLER.tar.xz \
&& tar -xvf $POPPLER.tar.xz \
&& rm $POPPLER.tar.xz \
&& wget http://download.osgeo.org/proj/$PROJ.tar.gz \
&& tar xvfz $PROJ.tar.gz \
&& rm $PROJ.tar.gz \
&& wget http://download.osgeo.org/gdal/2.0.3/$GDAL.tar.gz \
&& tar -xvf $GDAL.tar.gz \
&& rm $GDAL.tar.gz
## build packages
RUN cd $WNSCRIPTS/$POPPLER \
&& ./configure --prefix=$PREFIX --enable-xpdf-headers \
&& make install -j8 \
&& make clean
RUN cd $WNSCRIPTS/$PROJ \
&&./configure --prefix=$PREFIX \
&& make clean \
&& make \
&& make install -j 8 \
&& make clean \
&& cp $PREFIX/include/proj_api.h $PREFIX/lib
RUN cd $WNSCRIPTS/$GDAL \
&&./configure --prefix=$PREFIX --with-poppler=$PREFIX \
&& make -j 8 \
&& make install -j 8 \
&& make clean \
&& ldconfig
## build windninja
Run mkdir /packages/wind/build \
# && cd /packages/wind/build \
&& cd /packages/wind/windninja \
&& cmake -DNINJA_CLI=ON -DNINJAFOAM=OFF -DNINJA_QTGUI=OFF /packages/wind/windninja \
&& make \
&& make install \
&& ldconfig \
&& export WINDNINJA_DATA=/packages/wind/windninja/data
####################################################
## WGRIB2
####################################################
ENV CC=gcc
ENV FC=gfortran
RUN cd /code/grib2 \
&& make \
&& make lib
## add to path
ENV PATH=/code/grib2/wgrib2:$PATH
####################################################
## clean up
####################################################
RUN apt-get clean \
&& apt remove -y wget \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* \
&& rm -rf $WNSCRIPTS