-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.standardize_meta
43 lines (35 loc) · 1.65 KB
/
Dockerfile.standardize_meta
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
# Dockerfile supporting plugin for metadata standardization used in GRID file generation
FROM osgeo/gdal:ubuntu-small-3.5.1 as prod
RUN apt-get update && \
apt-get install -y python3-pip && \
pip3 install rasterio --no-binary rasterio
WORKDIR /plugin
# install pydsstools from source
RUN apt-get install -y build-essential
RUN apt-get install -y gfortran
RUN apt-get install -y git
RUN apt-get install -y unzip
RUN git clone https://github.com/Dewberry/pydsstools.git
# download good heclib files
RUN mkdir heclib && curl https://www.hec.usace.army.mil/nexus/repository/maven-public/mil/army/usace/hec/heclib/7-IP-10-linux-x86_64/heclib-7-IP-10-linux-x86_64.zip --output heclib/heclib-7-IP-10-linux-x86_64.zip
RUN ( cd heclib && unzip heclib-7-IP-10-linux-x86_64.zip )
# replace corrupt heclib files
RUN rm -r pydsstools/pydsstools/src/external/dss/headers
RUN rm pydsstools/pydsstools/src/external/dss/linux64/heclib.a
RUN cp -a heclib/headers pydsstools/pydsstools/src/external/dss/headers
RUN cp -a heclib/heclib.a pydsstools/pydsstools/src/external/dss/linux64/heclib.a
# install
RUN ( cd pydsstools && python3 -m pip install . )
# install plugin packages
COPY stormcloud/plugins/standardize_meta/requirements.txt .
RUN pip3 install -r requirements.txt
# copy scripts called by GRID generation script
COPY stormcloud/common/ common/.
# copy main script and plugin scripts
COPY stormcloud/construct_meta.py .
COPY stormcloud/plugins/standardize_meta/entrypoint.sh .
COPY stormcloud/plugins/standardize_meta/main.py .
COPY stormcloud/plugins/standardize_meta/standardize_meta_plugin.py .
# # run entrypoint
# RUN chmod +x /plugin/entrypoint.sh
# CMD [ "./entrypoint.sh" ]