Skip to content

Commit

Permalink
added tagged training to entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jmills-ncar committed Jun 8, 2018
1 parent cef956d commit 9a12715
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 8 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
![](https://ral.ucar.edu/sites/default/files/public/wrf_hydro_symbol_logo_2017_09_150pxby63px.png) WRF-HYDRO

# wrf_hydro_docker

[![Build Status](https://travis-ci.org/NCAR/wrf_hydro_docker.svg?branch=master)](https://travis-ci.org/NCAR/wrf_hydro_docker)
Expand Down
91 changes: 88 additions & 3 deletions dev/Readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,92 @@
![](https://ral.ucar.edu/sites/default/files/public/wrf_hydro_symbol_logo_2017_09_150pxby63px.png) WRF-HYDRO

# Overview

Containers used for WRF-Hydro development. These containers are also suitable options for running
WRF-Hydro simulations on a single-node system. See sub-tags (e.g. 'dev', 'conda') for details on
WRF-Hydro simulations on a single-node system. See sub-tags (e.g. 'base', 'conda') for details on
each container.

---------------------------------------------------
## base

### Overview
This container is used for WRF-Hydro development and single-node WRF-Hydro simulations.

This container includes the following:

* Ubuntu base image
* All system libraries required by WRF-Hydro
* Text editors - VIM, Nano, Emacs
* git version control system
* nccmp - NetCDF Compare utility for diffing NetCDF files
* NetCDF C and Fortran libraries
* MPI

### Usage
**Step 1: Pull the image**
```
docker pull wrfhydro/dev:base
```

**Step 2: Run the image**
```
docker run -it wrfhydro/dev:base
```

**Optionally: Run the image with a volume mount**

**NOTE: DO NOT COMPILE WRFHYDRO IN THE MOUNTED FOLDER.**
On some filesystems, WRF-Hydro will not compile correctly if compilation occurs in a mounted
directory. WRF-Hydro will run in a mounted directory on most filesystems, but compilation may fail.

```
docker run -v <path-to-your-local-mount-folder>:<path-to-the-desired-docker-folder> -it wrfhydro/dev:base
```

---------------------------------------------------

## conda

### Overview
This container is used for WRF-Hydro development and single-node WRF-Hydro simulations.

This container includes the following:

* Everything in wrfhydro/dev

* Miniconda with the following libraries and all dependencies
+ jupyterlab
+ jupyter_contrib_nbextensions
+ boltons
+ cartopy
+ deepdiff
+ f90nml
+ netcdf4
+ pytest
+ pytest-datadir
+ rasterio
+ termcolor
+ wrfhydropy
+ xarray

### Usage
**Step 1: Pull the image**
```
docker pull wrfhydro/dev:conda
```

**Step 2: Run the image**
```
docker run -it wrfhydro/dev:conda
```

**Optionally: Run the image with a volume mount**

**NOTE: DO NOT COMPILE WRFHYDRO IN THE MOUNTED FOLDER.**
On some filesystems, WRF-Hydro will not compile correctly if compilation occurs in a mounted
directory. WRF-Hydro will run in a mounted directory on most filesystems, but compilation may fail.


```
docker run -v <path-to-your-local-mount-folder>:<path-to-the-desired-docker-folder> -it
wrfhydro/dev:conda
```

5 changes: 5 additions & 0 deletions domains/Readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
![](https://ral.ucar.edu/sites/default/files/public/wrf_hydro_symbol_logo_2017_09_150pxby63px.png) WRF-HYDRO

# THESE DOCKER DATA CONTAINERS FOR DOMAINS WILL SOON BE DEPRECATED
These images are a temporary solution until an object store is established.

# Overview

These docker data containers are used primarily by the WRF-Hydro development team. If you are
Expand Down
4 changes: 2 additions & 2 deletions training/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ RUN wget https://ral.ucar.edu/sites/default/files/public/ESMFregrid_NLDAS.tar_.g
COPY ./gdrive_download.py gdrive_download.py
RUN chmod 777 gdrive_download.py


RUN python gdrive_download.py --file_id 1PrDTA-hMFNqQrDag1Dm7tX1rT1gQ_25e --dest_file /home/docker/wrf-hydro-training/regridding/data/nldas_forcing.tar.gz
RUN mkdir /home/docker/wrf-hydro-training/regridding/data/ \
&& python gdrive_download.py --file_id 1PrDTA-hMFNqQrDag1Dm7tX1rT1gQ_25e --dest_file /home/docker/wrf-hydro-training/regridding/data/nldas_forcing.tar.gz

# install NCL
RUN wget https://www.earthsystemgrid.org/dataset/ncl.640.dap/file/ncl_ncarg-6.4.0-Debian8.6_64bit_gnu492.tar.gz \
Expand Down
6 changes: 3 additions & 3 deletions training/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ echo
echo -e "\e[0;49;32m-----------------------------------\e[0m"
echo -e "\e[7;49;32mRetrieving WRF-Hydro training\e[0m"

release=$(curl -s https://api.github.com/repos/NCAR/wrf_hydro_model_tools/releases/latest)
release=$(curl -s https://api.github.com/repos/NCAR/wrf_hydro_training/releases/latest)
version=$(echo "$release" | grep "tag_name" | cut -d : -f 2,3 | tr -d \")
version=$(echo $version | tr "," " ")
#git clone --branch $version https://github.com/NCAR/wrf_hydro_training
git clone https://github.com/NCAR/wrf_hydro_training
git clone --branch $version https://github.com/NCAR/wrf_hydro_training
#git clone https://github.com/NCAR/wrf_hydro_training
mv /home/docker/wrf_hydro_training/lessons /home/docker/wrf-hydro-training/lessons
rm -rf /home/docker/wrf_hydro_training/

Expand Down

0 comments on commit 9a12715

Please sign in to comment.