Skip to main content

Gurobi for Google colab

Answered

Comments

3 comments

  • Riley Clement
    Gurobi Staff Gurobi Staff

    Hi Supun,

    For Colab, and other online notebook services such as Binder or Databricks, the best option is usually a WLS license.  Please see the following article for more information and instructions on obtaining an Academic WLS license:

    What is an Academic WLS license? 

    Please be sure not to expose your WLS credentials in a notebook that is viewable by others.

    - Riley

    0
  • Supun Amarathunga
    First Comment
    First Question

    Hi Riley,

    Is there any limitation on Academic WLS license ? I have configured it in colab and tried to solve a robust optimization problem using RSOME.

    import gurobipy as gp

    # Create an environment with your WLS license
    params = {
    "WLSACCESSID": 'xxxx',
    "WLSSECRET": 'xxxx',
    "LICENSEID": xxxx,
    }
    env = gp.Env(params=params)
     
    But I am not sure when the environment is set to use WLS license for RSOME.
     
    0
  • Riley Clement
    Gurobi Staff Gurobi Staff

    Hi Supun,

    There are no restrictions on academic licenses.

    We have not had many users using RSOME, but one did have issues in the past and resolved it by modifying the RSOME source code to force their license to be used. I unfortunately do not have further details of this.

    I think it would be worth trying an alternative approach to using your licence where you upload the licence file and then set an environment variable (GRB_LICENSE_FILE) telling Gurobi where to find it. I guess you would have to set this variable programmatically in your notebook as the first thing you do. Please see the following article for further details.

    https://support.gurobi.com/hc/en-us/articles/360013417211-Where-do-I-place-the-Gurobi-license-file-gurobi-lic

    - Riley

    0

Please sign in to leave a comment.