Sign inSign up

dhardestylewis/hand_taudem_docker

By dhardestylewis

•Updated over 5 years ago

Height above nearest drainage (HAND) method using strictly TauDEM and Python glue

Image
1

1.1K

dhardestylewis/hand_taudem_docker repository overview

⁠Dockerfile for HAND-TauDEM

The following instructions are for Docker. Instructions for Singularity are below.

HAND-TauDEM commands may be run as one-off commands using this Docker image using the following shell command as a template:

docker run --name hand_taudem_bash --rm -i -t hand_taudem --mount type=bind,source="$(pwd)",target="/mnt/host" pitremove -z /mnt/host/DEM.tif -fel /mnt/host/DEMfel.tif

or multiple HAND-TauDEM commands may be run in sequence bringing up the Docker image once for all commands using the following shell command as a template:

docker run --name hand_taudem_bash --rm -i -t hand_taudem --mount type=bind,source="$(pwd)",target="/mnt/host" bash hand_taudem_commands.sh

where hand_taudem_commands.sh is written according to this template:

#!/bin/bash
pitremove -z /mnt/host/DEM.tif -fel /mnt/host/DEMfel.tif

Singularity instructions.

The Singularity pull command is similar to the Docker pull command:

singularity pull \
    --name hand_taudem.sif \
    docker://dhardestylewis/hand_taudem_docker:latest

Once pulled, a one-off HAND-TauDEM command using Singularity can be issued:

singularity exec \
    hand_taudem.sif \
    bash -c "pitremove -z /mnt/host/DEM.tif -fel /mnt/host/DEMfel.tif"

An interactive shell in the Singularity container may be used for troubleshooting or debugging:

singularity exec \
    hand_taudem.sif \
    bash

HAND-TauDEM combined with other commands in a shell script

HAND-TauDEM may be wrapped in a shell script and run using Docker:

docker run \
    --name hand_taudem_bash \
    --rm \
    -i \
    -t \
    dhardestylewis/hand_taudem_docker:latest \
    --mount type=bind,source="$(pwd)",target="/mnt/host" \
    bash -c './hand_taudem_commands.sh'

where the file hand_taudem_commands.sh may be written as:

#!/bin/bash

## Execute test command to demonstrate functioning image
pitremove -z /mnt/host/DEM.tif -fel /mnt/host/DEMfel.tif 

To do the same using Singularity, execute:

singularity exec \
    hand_taudem.sif \
    bash -c './hand_taudem_commands.sh'

where hand_taudem_commands.sh is written as above.

Tag summary

Content type

Image

Digest

Size

2.3 GB

Last updated

over 5 years ago

docker pull dhardestylewis/hand_taudem_docker