Skip to content

Enable Gurobi license parameters to be loaded through environment variables #237

Open
@jonrkarr

Description

@jonrkarr

The Gurobi API can be used to invoke Gurobi with license information passed through environment variables rather than license files. This would make it easier to deploy OptLang with Gurobi in containers (e.g., Docker, Singularity).

import gurobipy
params = {
    'LICENSEID': int(os.getenv('GRB_LICENSEID')),
    ...
}
env = gurobipy.Env(params=params)
model = gurobipy.Model(env=env)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions