Easily run the memote command line tools from a Docker container. You can find the main documentation on readthedocs. If you use this Docker image, please cite the corresponding Zenodo DOI: [placeholder]. For the original software, please cite Memote.
The container exposes the memote command line tool. If you run the container without any arguments you will see the base help message.
docker run ghcr.io/metabolicatlas/memote-docker:0.17For now, the best way to have memote interact with files is to mount a local directory into the container. The only hurdle is that you may have to afterwards change the permissions of the output file to your own user.
docker run -v ~/local/path/to/models/directory:/opt ghcr.io/metabolicatlas/memote-docker:0.17 memote run /opt/my-model.xmlThe following functionality has been added when comparing to the original repository:
- Memote v0.17 (versus v0.12)
- Python v3.11 (versus v3.6)
- addition of
scipyandyamllint - Zenodo DOIs
- Gurobi support
- arm64 support (Apple Silicon) in addition to amd64
The image bundles gurobipy; if a Gurobi license is provided the container switches to Gurobi, otherwise it falls back to GLPK.
- Preferred: set
GUROBI_LICENSE_B64to a base64-encodedgurobi.licstring (preserves newlines). The entrypoint decodes it to~/.gurobi/gurobi.licand setsCOBRA_SOLVER=gurobi. - Fallback: set
GUROBI_LICENSEto the raw license text (written as-is to~/.gurobi/gurobi.lic). - If neither is set,
COBRA_SOLVERdefaults toglpkand the existing behaviour is unchanged.
GitHub Actions example using base64:
- name: Run memote with Gurobi
env:
GUROBI_LICENSE_B64: ${{ secrets.GUROBI_LICENSE_B64 }}
run: |
docker run -e GUROBI_LICENSE_B64="$GUROBI_LICENSE_B64" \
ghcr.io/metabolicatlas/memote-docker:0.17 \
memote run /opt/my-model.xml