{"id":38730161,"url":"https://github.com/csdms/bmi-example-c-grpc4bmi","last_synced_at":"2026-01-17T11:25:34.524Z","repository":{"id":305788332,"uuid":"852914110","full_name":"csdms/bmi-example-c-grpc4bmi","owner":"csdms","description":"Run the C BMI example through grpc4bmi ","archived":false,"fork":false,"pushed_at":"2025-09-25T23:46:12.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-09-26T01:25:27.109Z","etag":null,"topics":["bmi","c","csdms","docker","grpc4bmi"],"latest_commit_sha":null,"homepage":"https://bmi.csdms.io","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csdms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-09-05T16:40:55.000Z","updated_at":"2025-09-25T23:46:16.000Z","dependencies_parsed_at":"2025-09-26T01:14:48.227Z","dependency_job_id":"bfd315ba-bef9-4088-8c3d-51fcdc6c8443","html_url":"https://github.com/csdms/bmi-example-c-grpc4bmi","commit_stats":null,"previous_names":["csdms/bmi-example-c-grpc4bmi"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/csdms/bmi-example-c-grpc4bmi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-example-c-grpc4bmi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-example-c-grpc4bmi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-example-c-grpc4bmi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-example-c-grpc4bmi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csdms","download_url":"https://codeload.github.com/csdms/bmi-example-c-grpc4bmi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-example-c-grpc4bmi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28507210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T10:25:30.148Z","status":"ssl_error","status_checked_at":"2026-01-17T10:25:29.718Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bmi","c","csdms","docker","grpc4bmi"],"created_at":"2026-01-17T11:25:33.822Z","updated_at":"2026-01-17T11:25:34.516Z","avatar_url":"https://github.com/csdms.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Basic Model Interface](https://img.shields.io/badge/CSDMS-Basic%20Model%20Interface-green.svg)](https://bmi.readthedocs.io/)\n[![DOI](https://zenodo.org/badge/852914110.svg)](https://doi.org/10.5281/zenodo.17204368)\n[![Test](https://github.com/csdms/bmi-example-c-grpc4bmi/actions/workflows/test.yml/badge.svg)](https://github.com/csdms/bmi-example-c-grpc4bmi/actions/workflows/test.yml)\n[![Docker Hub](https://github.com/csdms/bmi-example-c-grpc4bmi/actions/workflows/release.yml/badge.svg)](https://github.com/csdms/bmi-example-c-grpc4bmi/actions/workflows/release.yml)\n![Docker Image Version](https://img.shields.io/docker/v/csdms/bmi-example-c-grpc4bmi)\n\n# bmi-example-c-grpc4bmi\n\nSet up a [grpc4bmi](https://grpc4bmi.readthedocs.io) server\nto run a containerized version\nof the [Basic Model Interface](https://bmi.readthedocs.io) (BMI)\n[C example](https://github.com/csdms/bmi-example-c)\nthrough Python.\n\n## Build\n\nThere are two options for building this project:\n\n1. from a base image, [source-base](./images/source-base/), where grpc and its dependent libraries, grpc4bmi, and the BMI C example are all built from source\n1. from a base image, [conda-base](./images/conda-base/), where grpc and its dependent libraries are installed through conda-forge, the BMI C example is installed from a separate conda-based Docker image, and grpc4bmi is built from source\n\nIn each case, the grpc4bmi server is exposed through port 55555.\n\n### source-base\n\nBuild this example locally with:\n```\ndocker build --tag bmi-example-c-grpc4bmi images/source-base\n```\nThe image is (temporarily) built on the [mdpiper/grpc4bmi](https://hub.docker.com/r/mdpiper/grpc4bmi) base image.\nThe OS is Linux/Ubuntu.\nThe C BMI example, grpc4bmi, and the grpc4bmi server are installed in `/usr/local`.\n\n### conda-base\n\nBuild this example locally with:\n```\ndocker build --tag bmi-example-c-grpc4bmi images/conda-base\n```\nThe image is built on the [csdms/grpc4bmi](https://hub.docker.com/r/csdms/grpc4bmi) base image,\nwhich is built on the [condaforge/miniforge3](https://hub.docker.com/r/condaforge/miniforge3) base image.\nThe OS is Linux/Ubuntu.\nThe C BMI example, grpc4bmi, and the grpc4bmi server are installed in `/opt/conda`.\n\n## Run\n\nUse the grpc4bmi Docker client to access the BMI methods of the containerized model.\n\nInstall with *pip*:\n```\npip install grpc4bmi\n```\nThen, in a Python session, access the C *Heat* model in the image built above with:\n```python\nfrom grpc4bmi.bmi_client_docker import BmiClientDocker\n\n\nm = BmiClientDocker(image='bmi-example-c-grpc4bmi', image_port=55555, work_dir=\".\")\nm.get_component_name()\n\ndel m  # stop container cleanly\n```\n\nIf the image isn't found locally, it's pulled from Docker Hub\n(e.g., try the `csdms/bmi-example-c-grpc4bmi` image).\n\nFor more in-depth examples of running the *Heat* model through grpc4bmi,\nsee the [examples](./examples) directory.\n\n## Developer notes\n\nA versioned, multiplatform image built from the *conda-base* image in this repository is hosted on Docker Hub\nat [csdms/bmi-example-c-grpc4bmi](https://hub.docker.com/r/csdms/bmi-example-c-grpc4bmi).\nThis image is automatically built and pushed to Docker Hub\nwith the [release](./.github/workflows/release.yml) CI workflow.\nThe workflow is only run when the repository is tagged.\nTo manually build and push an update, run:\n```\ndocker buildx build --platform linux/amd64,linux/arm64 -t csdms/bmi-example-c-grpc4bmi:latest --push .\n```\nA user can pull this image from Docker Hub with:\n```\ndocker pull csdms/bmi-example-c-grpc4bmi\n```\noptionally with the `latest` tag or with a version tag.\n\n## Acknowledgment\n\nThis 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*.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsdms%2Fbmi-example-c-grpc4bmi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsdms%2Fbmi-example-c-grpc4bmi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsdms%2Fbmi-example-c-grpc4bmi/lists"}