Skip to content

Installation

Lemutisme edited this page Nov 7, 2026 · 1 revision

Installation

Requirements

  • Linux, Python 3.11, PyTorch 2.8.0 with CUDA 12.8 wheels, and an NVIDIA GPU with a driver for CUDA 12.8. The solver also runs on the CPU with --device cpu, which is much slower and is meant for small tests.
  • IPOPT, used for local solves, comes with cyipopt from conda-forge.
  • The paper results were produced on one NVIDIA RTX 5090. The installation and the commands below were also tested on a fresh machine with a V100 GPU and on a fresh CPU-only machine.
  • The solver runs in double precision.
  • Licenses: everything in solver/ is BSD-3-Clause (see solver/NOTICE); the rest of the repository is Apache-2.0.

Install

All paths are relative to the repository root.

git clone https://github.com/Verified-Intelligence/GEAR.git
cd GEAR
conda create -y -q -p ./env -c conda-forge --override-channels python=3.11 cyipopt 2>&1 | tail -3
./env/bin/python -m pip install -q torch==2.8.0 torchvision==0.23.0 --index-url https://download.pytorch.org/whl/cu128 2>&1 | tail -3
./env/bin/python -m pip install -q -r solver/requirements.txt 2>&1 | tail -3

solver/requirements.txt pins the remaining Python packages.

Unpack the benchmark models (Dataset):

(cd benchmarks && sha256sum -c SHA256SUMS && tar -xJf gear-benchmarks.tar.xz) && ls benchmarks benchmarks/gams_world benchmarks/minlplib_linear && find benchmarks -type f | wc -l

Check the installation

export PYTHONPATH=$PWD/solver:$PWD/solver/complete_verifier PYTHONNOUSERSITE=1; ./env/bin/python -c "
import auto_LiRPA, gear, nlp_solver, torch, cyipopt
for m in (auto_LiRPA, gear, nlp_solver): print(m.__name__, m.__file__)
print('torch', torch.__version__, torch.__file__, 'cuda available:', torch.cuda.is_available())
assert torch.__version__.startswith('2.8.0')
print('cyipopt', cyipopt.__version__, cyipopt.__file__)
"

The output lists the paths of the three packages under solver/, torch 2.8.0+cu128, cuda available: True on a GPU machine, and the cyipopt version. Then solve one instance (Quick Start).

Clone this wiki locally