Maintained by: Gurobi Optimization
Where to get help: Gurobi Support, Gurobi Documentation
When building a production application, we recommend using an explicit version number instead of the latest
tag.
This way, you are in control of the upgrade process of your application.
Supported architectures: linux/amd64, linux/arm64
Published image artifact details: https://github.com/Gurobi/docker-compute
Gurobi images:
- gurobi/optimizer: Gurobi Optimizer (full distribution)
- gurobi/python: Gurobi Optimizer (Python API only)
- gurobi/python-example: Gurobi Optimizer example in Python with a WLS license
- gurobi/modeling-examples: Optimization modeling examples (distributed as Jupyter Notebooks)
- gurobi/compute: Gurobi Compute Server
- gurobi/manager: Gurobi Cluster Manager
The Gurobi Optimizer is the fastest and most powerful mathematical programming solver available for your LP, QP and MIP (MILP, MIQP, and MIQCP) problems. More info at the Gurobi Website.
The Gurobi Compute Server has been designed to simplify the task of building and deploying modern optimization applications. It allows you to seamlessly offload your optimization computations onto one or more dedicated optimization servers grouped in a cluster. Users and applications can share the servers thanks to advanced queuing and load balancing capabilities. Users can monitor jobs, and administrators can manage the servers. Gurobi Compute Server Documentation
The gurobi/compute
image provides a Docker image ready to be deployed in a cluster.
The Web License Service (WLS) is a new Gurobi licensing service for containerized environments (Docker, Kubernetes...). Gurobi components can automatically request and renew license tokens to the WLS servers available in several regions worldwide. WLS only requires that your container has access to the Internet. Commercial users can request an evaluation and academic users can request a free license. Please register to access the Web License Manager and read the documentation
Note that other standard license types (NODE, Academic) do not work with containers. Please contact your sales representative at sales@gurobi.com to discuss licensing options.
You will need to specify a set of properties to connect to a license server. You have two options:
-
Mounting the client license file: You can store connection parameters in a client license file (typically called
gurobi.lic
) and mount it to the container. This option provides a simple approach for testing with Docker. When using Kubernetes, the license file can be stored as a secret and mounted in the container. -
Setting parameters through environment variables for a WLS license: GRB_WLSACCESSID, GRB_WLSSECRET, and GRB_LICENSEID. These variables are used to pass the access ID, the secret, and the license ID respectively.
We do not recommend adding the license file to the Docker image itself. It is not a flexible solution as you may not reuse the same image with different settings. More importantly, it is not secure as some license files need to contain credentials in the form of API keys that should remain private.
The following command mounts the license file from the current directory $PWD
and starts a Compute Server instance.
$ docker run -p61000:61000 \
--volume=$PWD/gurobi.lic:/opt/gurobi/gurobi.lic:ro \
gurobi/compute --hostname=localhost
If you have the Gurobi Optimizer client installed locally, you can test your deployment by
submitting a model for optimization with the gurobi_cl
command line tool.
$ gurobi_cl ComputeServer=localhost:61000 ...examples/data/glass4.mps
Example docker-compose.yml
for a compute server:
version: '3.1'
services:
compute:
image: gurobi/compute:latest
restart: always
ports:
- "61000:61000"
command: --hostname=localhost
volumes:
- ./gurobi.lic:/opt/gurobi/gurobi.lic:ro
Run $ docker-compose up
If you have the Gurobi Optimizer client installed locally, you can test your deployment by
submitting a model for optimization with the gurobi_cl
command line tool.
$ gurobi_cl ComputeServer=localhost:61000 ...examples/data/glass4.mps
For example on how to deploy Compute Server with the Gurobi Cluster Manager in Kubernetes, visit the Cluster Manager page, and scroll down to using Kubernetes.
If you want to set up a cluster of Compute Server nodes, we recommend using a Cluster Manager.
By downloading and using this image, you agree with the End-User License Agreement for the Gurobi software contained in this image.
As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.