There are two main reasons for this error:
- You are using a WLS license with a Gurobi version earlier than 10.0.0 natively on your Windows/MacOS/Linux machine. In this case, please update to Gurobi version 10.0.0 or newer.
- You are using a WLS license with a Gurobi version up to 9.5.0 in a container environment (e.g., Docker). In this case, either update to Gurobi version 9.5.1 or newer, or try the fix below.
Fix for case 2
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, and has been fixed in 9.5.1. Affected platforms are for example:
- 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.
Comments
0 comments
Article is closed for comments.