This error is caused by the fact that the latest versions of some Docker host systems have switched to cgroups v2 which causes a conflict with Gurobi's Web License Service (WLS). This issue is present in all Gurobi versions up to 9.5.0. The issue will be fixed with the upcoming technical release 9.5.1. Affected platforms are:
- Docker Desktop (MacOS and Windows)
- Docker Engine running on Ubuntu 21.10, Debian 11, Fedora 31 (and later)
The workaround depends on whether one wants to use docker run
or docker-compose
.
docker run
Add the following parameters when you call docker run using a Gurobi image.
docker run --privileged --cgroupns=host ...
Note: --privileged
might not be needed on linux hosts.
docker compose
privileged: True
can be set within your docker-compose.yml file, however the cgroupns
option cannot. This property must be added as a default to the settings of Docker Desktop or Docker Engine. One should update the Docker settings to add the following property:
"default-cgroupns-mode": "host"
In Docker Desktop, one can access those in the "Preferences" screen. For other software than Docker Desktop, these settings are also stored in a JSON file but the location depends on the operating system, e.g., the default on Linux would be /etc/docker/daemon.json
.
In the JSON file, you should add the following top-level option:
{
...
"default-cgroupns-mode": "host"
}
Then, completely delete your container instances and restart the Docker daemon before running docker-compose up
again.