-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
129 lines (112 loc) · 3.59 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
FROM 018923174646.dkr.ecr.us-west-2.amazonaws.com/hls-base-3.5.1
ENV PREFIX=/usr/local \
SRC_DIR=/usr/local/src \
GCTPLIB=/usr/local/lib \
HDFLIB=/usr/local/lib \
ZLIB=/usr/local/lib \
SZLIB=/usr/local/lib \
JPGLIB=/usr/local/lib \
PROJLIB=/usr/local/lib \
HDFINC=/usr/local/include \
GCTPINC=/usr/local/include \
GCTPLINK="-lGctp -lm" \
HDFLINK=" -lmfhdf -ldf -lm" \
ECS_ENABLE_TASK_IAM_ROLE=true \
PYTHONPATH="${PYTHONPATH}:${PREFIX}/lib/python3.6/site-packages" \
ACCODE=LaSRCL8V3.5.1 \
LC_ALL=en_US.utf-8 \
LANG=en_US.utf-8
# The Python click library requires a set locale
RUN localedef -i en_US -f UTF-8 en_US.UTF-8
# Move common files to source directory
COPY ./hls_libs/common $SRC_DIR
# Move and compile addFmaskSDS
COPY ./hls_libs/addFmaskSDS ${SRC_DIR}/addFmaskSDS
RUN cd ${SRC_DIR}/addFmaskSDS \
&& make \
&& make clean \
&& make install \
&& cd $SRC_DIR \
&& rm -rf addFmaskSDS
# Move and compile twohdf2one
COPY ./hls_libs/twohdf2one ${SRC_DIR}/twohdf2one
RUN cd ${SRC_DIR}/twohdf2one \
&& make \
&& make clean \
&& make install \
&& cd $SRC_DIR \
&& rm -rf twohdf2one
# Move and compile consolidate
COPY ./hls_libs/consolidate ${SRC_DIR}/consolidate
RUN cd ${SRC_DIR}/consolidate \
&& make \
&& make clean \
&& make install \
&& cd $SRC_DIR \
&& rm -rf consolidate
# Move and compile derive_s2ang
COPY ./hls_libs/derive_s2ang ${SRC_DIR}/derive_s2ang
RUN cd ${SRC_DIR}/derive_s2ang \
&& make \
&& make clean \
&& make install \
&& cd $SRC_DIR \
&& rm -rf derive_s2ang
# Move and compile derive_s2ang
COPY ./hls_libs/consolidate_s2ang ${SRC_DIR}/consolidate_s2ang
RUN cd ${SRC_DIR}/consolidate_s2ang \
&& make \
&& make clean \
&& make install \
&& cd $SRC_DIR \
&& rm -rf consolidate_s2ang
# Move and compile create_s2at30m
COPY ./hls_libs/create_s2at30m ${SRC_DIR}/create_s2at30m
RUN cd ${SRC_DIR}/create_s2at30m \
&& make \
&& make clean \
&& make install \
&& cd $SRC_DIR \
&& rm -rf create_s2at30m
# Move and compile derive_s2nbar
COPY ./hls_libs/derive_s2nbar ${SRC_DIR}/derive_s2nbar
RUN cd ${SRC_DIR}/derive_s2nbar \
&& make \
&& make clean \
&& make install \
&& cd $SRC_DIR \
&& rm -rf derive_s2nbar
# Move and compile L8like
COPY ./hls_libs/L8like ${SRC_DIR}/L8like
RUN cd ${SRC_DIR}/L8like \
&& make \
&& make clean \
&& make install \
&& cd $SRC_DIR \
&& rm -rf L8like
# Move and compile s2trim
COPY ./hls_libs/trim ${SRC_DIR}/trim
RUN cd ${SRC_DIR}/trim \
&& make \
&& make clean \
&& make install \
&& cd $SRC_DIR \
&& rm -rf trim
COPY ./hls_libs/L8like/bandpass_parameter.S2A.txt ${PREFIX}/bandpass_parameter.S2A.txt
COPY ./hls_libs/L8like/bandpass_parameter.S2B.txt ${PREFIX}/bandpass_parameter.S2B.txt
RUN pip3 install --upgrade awscli
RUN pip3 install click==7.1.2
RUN pip3 install rio-cogeo==1.1.10 --no-binary rasterio --user
RUN pip3 install git+https://github.com/NASA-IMPACT/[email protected]
RUN pip3 install git+https://github.com/NASA-IMPACT/[email protected]
RUN pip3 install git+https://github.com/NASA-IMPACT/[email protected]
RUN pip3 install wheel
RUN pip3 install git+https://github.com/NASA-IMPACT/[email protected]
RUN pip3 install libxml2-python3
RUN pip3 install git+https://github.com/NASA-IMPACT/[email protected]
RUN pip3 install git+https://github.com/NASA-IMPACT/[email protected]
RUN pip3 install git+https://github.com/NASA-IMPACT/[email protected]
COPY ./scripts/* ${PREFIX}/bin/
ENV OMP_NUM_THREADS=4
ENTRYPOINT ["/bin/sh", "-c"]
CMD ["sentinel.sh"]