Skip to content

Commit

Permalink
add Dockerfile to create iwrf-metplus image and update instructions t…
Browse files Browse the repository at this point in the history
…o use that container
  • Loading branch information
georgemccabe committed Oct 7, 2024
1 parent c9e7704 commit ebba5ac
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
12 changes: 12 additions & 0 deletions docker/metplus/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ARG METPLUS_TAG=6.0.0-beta5

FROM dtcenter/metplus-analysis:${METPLUS_TAG}

# install wrf python package from branch in PR NCAR/wrf-python#242
# because wrf will not install from pip
RUN python3 -m pip install --upgrade pip \
&& python3 -m pip install git+https://github.com/DWesl/wrf-python.git@cmake-build \
&& python3 -m pip install cartopy
# && git clone --branch cmake-build https://github.com/DWesl/wrf-python \
# && cd wrf-python \
# && pip install .
18 changes: 15 additions & 3 deletions docs/Users_Guide/running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,24 @@ Load the apptainer module::

module load apptainer

Change directory to scratch and pull the containers from DockerHub.
Change directory to scratch and pull the images from DockerHub.
This will create a `.sif` file in the current directory::

apptainer pull ${SCRATCH}/metplus-dev_develop.sif docker://dtcenter/metplus-dev:develop
apptainer pull ${SCRATCH}/iwrf-metplus.sif docker://ncar/iwrf:metplus-latest
apptainer pull ${SCRATCH}/data-matthew-input-obs.sif oras://registry-1.docker.io/ncar/iwrf:data-matthew-input-obs

.. note::

If an error is displayed when attempting to pull the METplus image,
creating a DockerHub account and authenticating through apptainer may be
necessary.

::

apptainer remote login --username **{USERNAME}** docker://docker.io

where **{USERNAME}** is your DockerHub username.

Create a directory to store the output::

mkdir ${SCRATCH}/metplus_out
Expand Down Expand Up @@ -62,7 +74,7 @@ using the --bind argument)

Execute the run_metplus.py command inside the container to run the use case::

apptainer exec ${SCRATCH}/metplus-dev_develop.sif /metplus/METplus/ush/run_metplus.py /config/PointStat_matthew.conf
apptainer exec ${SCRATCH}/iwrf-metplus.sif /metplus/METplus/ush/run_metplus.py /config/PointStat_matthew.conf

Check that the output data was created locally::

Expand Down

0 comments on commit ebba5ac

Please sign in to comment.