-
Notifications
You must be signed in to change notification settings - Fork 31
Docker
To use the latest version of GridLAB-D with docker, install docker from see www.docker.com. Then run
host% docker pull gridlabd/slac-master:latest
host% docker tag gridlabd/slac-master:latest gld
To run your GridLAB-D docker image version of GridLAB-D:
host% docker run -vit $(pwd):/model gld gridlabd -W /model my_model.glm
If you are using a system where command aliases are allowed (e.g., linux):
host% alias gridlabd='docker run -vit $(pwd):/model gld gridlabd -W /model'
After that you can use the simpler command
host% gridlabd my_model.glm
Versions of GridLAB-D that support daemons also support direct control of and direct call to the active docker image from the gridlabd command line using the --docker command line option. When the docker image is enabled, the gridlabd command will run in a docker container instead of using the local installation.
The --docker command option only works when the docker daemon is installed and active. Note that this option is implemented in the gridlabd shell command, and not in the gridlabd binary. It does not show up in the list of commands displayed when the gridlabd --help command is used.
To enable a docker image:
localhost% gridlabd --docker enable <imagename>
Subsequent gridlabd commands will use the docker image gridlabd instead of the local installation.
To disable a docker image:
localhost% gridlabd --docker disable
Subsequent gridlabd commands will use the local installation instead of the docker image gridlabd.
To get a list of available and active docker images:
localhost% gridlabd --docker status
Copyright © 2020-2022, Regents of the Leland Stanford Junior University
This site is maintained by SLAC GISMo at SLAC National Accelerator National Laboratory, which is operated by Stanford University for the US Department of Energy under Contract DE-AC02-76RL00515.