-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
40 lines (30 loc) · 1.1 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
# Basin Setup requires GDAL
FROM geographica/gdal2:2.3.2
ENV TAUDEM_HASH f927ca639a1834565a76cb3df5acbcd2909d6d0d
ADD https://github.com/dtarb/TauDEM/archive/${TAUDEM_HASH}.tar.gz .
RUN apt-get -y update \
&& apt-get install -y git mpich wget zip unzip python3-pip \
&& apt-get autoremove
# Build taudem
RUN tar -xzf ${TAUDEM_HASH}.tar.gz -C /usr/src \
&& mkdir /usr/src/TauDEM-${TAUDEM_HASH}/bin \
&& cd /usr/src/TauDEM-${TAUDEM_HASH}/src \
&& make
RUN mkdir -p /usr/local/taudem/bin \
&& cp /usr/src/TauDEM-${TAUDEM_HASH}/bin/* /usr/local/taudem/bin/
ENV PATH /usr/local/taudem/bin:$PATH
# Copy over code base
RUN mkdir -p /code \
&& mkdir -p /code/basin_setup
COPY . /code/basin_setup/
RUN cd /code/basin_setup \
&& python3 -m pip install --upgrade pip \
&& python3 -m pip install setuptools wheel \
&& python3 -m pip install -r requirements.txt \
&& python3 setup.py install \
&& rm -rf /var/lib/apt/lists/*
# Setup the shared volume and add it as the starting place
VOLUME /data
WORKDIR /data
RUN echo "umask 0002" >> /etc/bash.bashrc
ENTRYPOINT ["generate_topo"]