-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-web
executable file
·49 lines (35 loc) · 1.43 KB
/
Dockerfile-web
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
FROM amazonlinux:2
WORKDIR /app
COPY . /app
## php
RUN yum install -y httpd && \
amazon-linux-extras install -y php7.2 && \
yum install -y php php-pgsql
## python/hdf5
RUN yum install -y tar mkdir sudo which git wget gtar openblas yum-utils gcc make
RUN yum install -y zlib-devel openssl11-devel libffi-devel
RUN cd /app/misc; tar zxvf cpython-3.8.11.tar.gz;cd cpython-3.8.11; ./configure --prefix=/usr/local/python-3.8.11; make; make install
RUN sudo ln -s /usr/local/python-3.8.11/bin/python3.8 /usr/bin/python3
RUN python3 -m pip install setuptools wheel numpy netCDF4
## build hdf5
RUN amazon-linux-extras install -y epel && \
yum install –y epel-release && \
yum-config-manager --enable epel && \
yum install -y hdf5-devel && \
python3 -m pip install h5py
## bring in the insar track data
# RUN cd /app/web/cgm_data && \
# mkdir -p insar && \
# cd insar && \
# wget -nv https://files.scec.org/s3fs-public/projects/cgm/2.0.0/data/cgm-v2.0.0-insar.tar.gz && \
# gtar -zxvf cgm-v2.0.0-insar.tar.gz
#ADD https://files.scec.org/s3fs-public/projects/cgm/2.0.0/data/cgm-v2.0.0-insar.tar.gz /app/web/cgm_data
RUN cd /app && \
git clone https://github.com/kmaterna/InSAR_CGM_readers_writers.git && \
cd InSAR_CGM_readers_writers && \
./setup.py install && \
chmod og+rw /app/web/result && \
chmod -R og+x /app/web/py &&\
cd /app
COPY ./doc/cgm.conf /etc/httpd/conf.d/
CMD ["apachectl", "-D", "FOREGROUND"]