This repo contains a Dockerized version of the OPGEE v4 tool.
To build the container, first install Docker or an equivalent containerization engine, then run:
docker build -t opgee .
The default entrypoint for the container prepares a conda
environment with the opg
tool. For example:
$ docker run --rm -it opgee opg --help
usage: opg [-h] [--logLevel LOGLEVEL] [--set name=value] [--verbose] [--version] [--VERSION] {compare,config,csv2xml,gensim,graph,gui,merge,run,runsim} ...
[... more output omitted ...]
To run a script, put it in a file, mount it as a volume, and set it as the command. There are several examples in the examples/
directory, which can be run like:
docker run --rm -it \
--volume $PWD/examples/detailed_run.sh:/detailed_run.sh:ro \
--volume $PWD/output:/output \
opgee /detailed_run.sh
This will output something like:
INFO opgee.field: Running 'gas_lifting_field'
INFO opgee.field: <Timer 'field.run' completed in 0:00:03>
INFO opgee.manager: <Timer 'run_serial' completed in 0:00:04>
INFO opgee.manager: <Timer 'Manager.run_packets' completed in 0:00:04>
INFO opgee.manager: Writing '/output/carbon_intensity.csv'
INFO opgee.manager: Writing '/output/energy.csv'
INFO opgee.manager: Writing '/output/emissions.csv'
INFO opgee.manager: Writing '/output/gases.csv'
INFO opgee.manager: Writing '/output/streams.csv'
and the output directory will contain the following:
ls output/
carbon_intensity.csv
emissions.csv
energy.csv
gases.csv
streams.csv
docker run --rm -it --net=host opgee opg gui -a example