forked from USACE-Cloud-Compute/ras-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile_6.5.0
More file actions
57 lines (43 loc) · 1.7 KB
/
Dockerfile_6.5.0
File metadata and controls
57 lines (43 loc) · 1.7 KB
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
#Set up the environment to build the cc-ras-runner plugin
FROM ghcr.io/usace-cloud-compute/cc-hdf5-ras-base:v1.0.0 as builder
#names specific to artifacts downloaded from cloud-wat-resources on the HEC Nexus. Replace version number in all args. Currently available 610,631,641. -bbb 20240229
ARG RAS_DEPLOYMENT=EngineOnly
ARG RAS_VERSION=HEC-RAS_650_Linux
ARG RAS_ARCHIVE=${RAS_VERSION}_${RAS_DEPLOYMENT}.zip
ARG NEXUS_RAS_URL=https://www.hec.usace.army.mil/nexus/repository/cloud-wat-resources/ras/${RAS_ARCHIVE}
ARG GOVERSION=1.24.12
ARG GOBINARCH=linux-amd64
ENV GOROOT=/go
ENV GOPATH=/src/go
ENV PATH=/go/bin:$PATH
RUN wget ${NEXUS_RAS_URL} &&\
unzip ${RAS_ARCHIVE} &&\
mv /${RAS_VERSION}_${RAS_DEPLOYMENT}/libs /ras/libs &&\
mv /${RAS_VERSION}_${RAS_DEPLOYMENT}/bin /ras/bin &&\
chmod -R +x /ras/* &&\
wget https://go.dev/dl/go${GOVERSION}.${GOBINARCH}.tar.gz -P / &&\
tar -xvzf go${GOVERSION}.${GOBINARCH}.tar.gz -C / &&\
mkdir -p src/ras-runner
COPY ./ /src/ras-runner
RUN mv /src/ras-runner/runScripts/${RAS_VERSION}/* /src/ras-runner
RUN cd /src/ras-runner &&\
go mod tidy &&\
go build
FROM rockylinux:8 as prod
ARG HDF5_PREFIX=/usr/local/lib/hdf5
ENV PATH=/hdf/bin:/ras/bin:/ras:$PATH
ENV LD_LIBRARY_PATH=${HDF5_PREFIX}/lib
RUN mkdir -p /sim/model
#RAS Binaries
COPY --from=builder /ras /ras
#cc-ras-runner binary
COPY --from=builder /src/ras-runner/ras-runner /ras/ras-runner
#hdf binaries
COPY --from=builder /hdf /hdf
#geom preproc script
COPY --from=builder /src/ras-runner/run-geom-preproc.sh /ras/
#model run script
COPY --from=builder /src/ras-runner/run-model.sh /ras/
RUN chmod +x /ras/run-model.sh &&\
chmod +x /ras/run-geom-preproc.sh
CMD ["/ras/ras-runner"]