Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/csdms/bmi-example-c-docker
The C BMI example, Dockerized
https://github.com/csdms/bmi-example-c-docker
Last synced: 4 days ago
JSON representation
The C BMI example, Dockerized
- Host: GitHub
- URL: https://github.com/csdms/bmi-example-c-docker
- Owner: csdms
- License: mit
- Created: 2024-08-29T18:18:23.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-29T19:32:03.000Z (4 months ago)
- Last Synced: 2024-08-29T20:45:42.438Z (4 months ago)
- Language: Dockerfile
- Size: 3.91 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bmi-example-c-docker
The [C example](https://github.com/csdms/bmi-example-c)
for the [Basic Model Interface](https://bmi.readthedocs.io),
dockerized.## Build the image
Build this example locally with:
```
docker build --tag bmi-example-c .
```
The image is based on the [csdms/bmi](https://hub.docker.com/r/csdms/bmi) image.
The OS is Linux/Ubuntu.
`conda` and `mamba` are installed in `CONDA_DIR=/opt/conda`,
and the *base* environment is activated.
The C BMI specification and example, including the `run_bmiheatc` executable, are installed into it.## Run a container
Run a container from this image interactively:
```
docker run -it bmi-example-c
```
This starts a bash shell in the container.
Run the example program `run_bmiheatc` with a configuration file:
```bash
cd /tmp
echo "1.5, 8.0, 6, 5" > config.txt
run_bmiheatc config.txt
```
View the program's output with:
```bash
cat bmiheatc.out
```## Developer notes
A versioned, multiplatform image built from this repository is hosted on Docker Hub
at [csdms/bmi-example-c](https://hub.docker.com/r/csdms/bmi-example-c/).
When this repository is tagged,
an image is automatically built and pushed to Docker Hub
by the [release](./.github/workflows/release.yml) CI workflow.
To manually build and push an update, run:
```
docker buildx build --platform linux/amd64,linux/arm64 -t csdms/bmi-example-c:latest --push .
```
A user can pull this image from Docker Hub with:
```
docker pull csdms/bmi-example-c
```
optionally with the `latest` tag or with a version tag.## What is the Basic Model Interface?
The Basic Model Interface (BMI) is a set of functions for querying, modifying, running, and coupling models.
Learn more at https://bmi.readthedocs.io/.## Acknowledgment
This work is supported by the U.S. National Science Foundation under Award No. [2103878](https://www.nsf.gov/awardsearch/showAward?AWD_ID=2103878), *Frameworks: Collaborative Research: Integrative Cyberinfrastructure for Next-Generation Modeling Science*.