Gurobi
A state-of-the-art software solver for mathematical optimization.
Gurobi requires an environment module
In order to use Gurobi, you must first load the appropriate environment module:
module load gurobi
Loading Gurobi#
To use Gurobi on the HPC system, load the module:
Python Usage#
Gurobi can be used in Python via the gurobipy package. It is recommended to install this using uv.
On a RCC terminal run:
Warning
Python 3.11 is required for compatibility with the Gurobi installation on the HPC.
Install the gurobipy and (if needed) jupyterlab packages:
Using Gurobi in Jupyter Notebooks (OOD)#
To use gurobipy in Jupyter Notebooks via Open OnDemand:
Create a Jupyter session by selecting "Interactive Sessions" then "Jupyter Notebooks" from the dropdown menu.
- Select
python-uv/latestfor the "Python version (required)". - Select "UV Virtual Environment" for the "Type of Environment Jupyter is installed in".
- Enter your Python environment name (in our example:
gurobienv). - Ensure "Internet Access via Web Proxy" is enabled.
- Click "Launch".
Warning
The webproxy module must be enabled or Gurobi solvers may fail to load.
Note
You must create your environment in the terminal before launching the Jupyter session in OOD.