Skip to content

Commit

Permalink
Improve the documentation on the docker images/files.
Browse files Browse the repository at this point in the history
Co-authored-by: SarahAlidoost <[email protected]>
  • Loading branch information
BSchilperoort and SarahAlidoost committed Jan 31, 2024
1 parent 565c0c8 commit 177b897
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/bmi.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For more information on each method, see the sections below.

### Dockerized executable
STEMMUS_SCOPE has a Docker image available. This allows you to run the executable file without having to install MCR.
The Docker image is available at https://ghcr.io/ecoextreml/stemmus_scope
The Docker image is available at https://ghcr.io/ecoextreml/stemmus_scope. The Docker image is created using the docker file [here](https://github.com/EcoExtreML/STEMMUS_SCOPE/blob/main/Dockerfile).

To use the Docker image, use the `DockerImage` setting in the configuration file:
```sh
Expand Down Expand Up @@ -50,10 +50,9 @@ If you need access to other model variables that are not yet available in the BM

## grpc4bmi

A [Docker image is available](https://ghcr.io/ecoextreml/stemmus_scope-grpc4bmi) in which the model as well as the Python BMI have been wrapped in a container.
This allows communication with a STEMMUS_SCOPE BMI through [grpc4bmi](https://grpc4bmi.readthedocs.io/en/latest/).
A [Docker image is available](https://ghcr.io/ecoextreml/stemmus_scope-grpc4bmi) in which the model as well as the Python BMI have been wrapped in a container. The Docker image is created using the Docker file [here](https://github.com/EcoExtreML/STEMMUS_SCOPE_Processing/blob/main/Dockerfile) and allows communication with a STEMMUS_SCOPE BMI through [grpc4bmi](https://grpc4bmi.readthedocs.io/en/latest/).

Doing so avoids the needs to install PyStemmusScope yourself, only Docker/apptainer and a python environment with grpc4bmi are required.
Doing so avoids the needs to install PyStemmusScope yourself, only Docker/apptainer and a python environment with grpc4bmi are required. Please note you should not specify `DockerImage` or `ExeFilePath` in the config file if you are using the grpc4bmi interface.

A demonstration is available [here](notebooks/grpc4bmi_demo.ipynb)

Expand Down Expand Up @@ -84,4 +83,4 @@ Lastly you have to update the `get_variable` and `set_variable` functions in `Py
Here you define how the python code can access them.
While writing the code you can inspect the state using `model.state`, which allows you to view the full contents of the HDF5 file for easier debugging.

When you release a new Docker image that is compatible with the new BMI implementation, you need to update the `compatible_tags` variable of the class `StemmusScopeDocker` in `PyStemmusScope/bmi/docker_process.py`.
After implementing the BMI changes, a new [STEMMUS_SCOPE Docker image](https://github.com/EcoExtreML/STEMMUS_SCOPE/pkgs/container/stemmus_scope) should be released that is compatible with the new BMI implementation. A new release usually includes a new tag. Then, you need to update the `compatible_tags` variable of the class `StemmusScopeDocker` in `PyStemmusScope/bmi/docker_process.py`.

0 comments on commit 177b897

Please sign in to comment.