Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jonrkarr opened this issue Sep 6, 2021 · 1 comment

Comments

@jonrkarr
Copy link

jonrkarr commented Sep 6, 2021

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)
@EmanuelGoncalves
Copy link

This would definitely be a great addition. Meanwhile, how can this be done?

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

No branches or pull requests

3 participants