Skip to content

Commit

Permalink
update readme for building and releasing the gmt-om-runner
Browse files Browse the repository at this point in the history
  • Loading branch information
nllong committed Dec 5, 2023
1 parent 05e8881 commit 0cf4973
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"words": [
"autoload",
"buildingspy",
"buildx",
"Combi",
"cvrmsd",
"dassl",
Expand All @@ -25,6 +26,7 @@
"MODELICAPATH",
"mofile",
"nllong",
"nrel",
"openstudio",
"Optimica",
"oversizing",
Expand Down
20 changes: 15 additions & 5 deletions geojson_modelica_translator/modelica/lib/runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,33 @@ The OpenModelica docker container needs to be built locally or pushed to Docker

The public use image is hosted on Docker hub under https://hub.docker.com/r/nrel/gmt-om-runner.

To build the docker container locally and push, the instructions are as follows:
To build the docker container locally, follow the below instructions:

```bash
cd geojson_modelica_translator/modelica/lib/runner

# have you computer setup for linux/amd64 and linux/arm64
docker build -t nrel/gmt-om-runner:latest .
```

The default tag will be `nrel/gmt-om-runner:latest`, which is the default version used in the om_docker.sh file.

### Releasing a new container for users

Build the container as described in the above section, then tag and push to the remote location. This
only is available to individuals with write access to the NREL org.
Releasing is only available to individuals with write access to the NREL org. Unfortunately, the NREL org is still
under a free plan resulting in a maximum of 3 users for the entire org, which have already been allocated.

Building for release is a bit different than development since you will need to handle multiple platforms. See
[docker's multi-platform images documentation](https://docs.docker.com/build/building/multi-platform/) on how to configure.

```bash
# Build for more platforms on release.
docker login

# Build for more platforms on release due to newer macos, etc., etc.
docker buildx create --use

# update version of OMC and determine if the latest should be updated. Ideally, the latest should be updated
# only if the new OMC release is needed to fix previous issues.
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t nrel/gmt-om-runner:v1.22.0 --push .
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t nrel/gmt-om-runner:latest --push .

```

0 comments on commit 0cf4973

Please sign in to comment.