-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.metviewer
110 lines (97 loc) · 2.76 KB
/
Dockerfile.metviewer
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
ARG MET_BASE_TAG
FROM dtcenter/met-base:${MET_BASE_TAG}
MAINTAINER John Halley Gotway <[email protected]>
#
# Constants
#
ENV TOMCAT_MAJOR_VERSION 9
ENV TOMCAT_MINOR_VERSION 0.89
ENV TOMCAT_VERSION ${TOMCAT_MAJOR_VERSION}.${TOMCAT_MINOR_VERSION}
ENV CATALINA_HOME /opt/tomcat
#
# Install system updates
#
RUN apt -y update && apt -y upgrade
#
# Expose METviewer port
#
EXPOSE 8080
#
# Install required packages
#
RUN apt -y install ant openjdk-17-jdk r-base mariadb-server ksh
#
# Setup default cran repo
#
RUN echo "r <- getOption('repos'); r['CRAN'] <- 'http://cran.us.r-project.org'; options(repos = r);" > ~/.Rprofile
#
# Install required R packages
#
RUN Rscript -e "install.packages('boot')" \
&& Rscript -e "install.packages('plotrix')" \
&& Rscript -e "install.packages('gsl')" \
&& Rscript -e "install.packages('data.table')" \
&& Rscript -e "install.packages('verification')"
#
# Install Tomcat
#
ENV CATALINA_HOME /opt/tomcat
RUN wget https://archive.apache.org/dist/tomcat/tomcat-${TOMCAT_MAJOR_VERSION}/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz \
&& tar -xvf apache-tomcat-${TOMCAT_VERSION}.tar.gz \
&& rm apache-tomcat*.tar.gz \
&& mv apache-tomcat* ${CATALINA_HOME} \
&& chmod +x ${CATALINA_HOME}/bin/*sh
#
# Create a link for python3
#
RUN ln -sf /usr/local/bin/python3.10 /usr/bin/python3
RUN ln -sf /usr/bin/python3 /usr/bin/python
RUN ln -sf /usr/local/bin/pip3.10 /usr/bin/pip3
RUN ln -sf /usr/bin/pip3 /usr/bin/pip
#
# Install GEOS - needed for cartopy
#
WORKDIR /tmp
RUN wget http://download.osgeo.org/geos/geos-3.7.2.tar.bz2
RUN tar xjf geos-3.7.2.tar.bz2
WORKDIR /tmp/geos-3.7.2
RUN ./configure ; make clean ; make
RUN make install
RUN ldconfig
WORKDIR /tmp
RUN rm -r geos-3.7.2.tar.bz2
#
# Install Python packages
#
RUN pip install cartopy \
&& pip install eofs \
&& pip install imutils==0.5.4 \
&& pip install imageio==2.19.2 \
&& pip install lxml==4.9.1 \
&& pip install matplotlib==3.5.2 \
&& pip install netcdf4==1.6.2 \
&& pip install numpy==1.22.0 \
&& pip install pytest==7.1.2 \
&& pip install metpy==1.3.1 \
&& pip install pyyaml==6.0 \
&& pip install scikit-image==0.19.3 \
&& pip install scikit-learn \
&& pip install scipy==1.11.1 \
&& pip install xarray==2022.3.0 \
&& pip install PyMySQL==1.0.2 \
&& pip install pint==0.19.2 \
&& pip install plotly==5.9.0 \
&& pip install kaleido==0.2.1 \
&& pip install attrs==22.1.0 \
&& pip install exceptiongroup==1.0.4 \
&& pip install iniconfig==1.1.1 \
&& pip install packaging==22.0 \
&& pip install pluggy==1.0.0 \
&& pip install pytz==2022.6 \
&& pip install setuptools==65.5.1 \
&& pip install six==1.16.0 \
&& pip install tomli==2.0.1 \
&& pip install wheel==0.38.1 \
&& pip install python-dateutil==2.8.2 \
&& pip install opencv-python \
&& pip install pandas==1.5.2