How To Install Academic License in Google Colab
AnsweredHello, I already install Gurobi in my notebook (google colab)
Then, I create folder gurobi in opt folder as below
Then I install the license tools from https://packages.gurobi.com/lictools/licensetools9.1.2_linux64.zip and extract it, then upload it to /opt/gurobi
I install the license (academic license) and it works :
But, when I use it, it show the error as below:
When I use gurobi with another academic license in my laptop (windows 10), it works fine. But in google colab, it can't works and show the error like above. What should I do?
-
As the message says, this license is not compatible with Docker containers. Please see the section "Web License Service for Container Environments Only" in Gurobi for Academics and Researchers for more information about requesting a license that can work within containers.
1 -
Thank you. It works :)
0 -
Hello,
I followed the instructions above oulined by Amany. I set up a license via "Web License Service for Container Environments Only" however, when I try to enter my API key I get the following message when trying to contact the license server
Do I need to be connected to my academic institution for it to work?
Thank you,
David
0 -
Hello David,
I was stuck on this for a day now as well.
It turns out, you don't need to use the grbgetkey or any other licensing tool. You have to only specify the WLSACCESSID, WLSSECRET and LICENSEID in your Gurobi environment, as seen in this example: https://github.com/Gurobi/docker-python-example/blob/master/9.1.2/matrix1.py
Hope, this works for you as well.
1 -
Thank you Márton. It works now!
0 -
Hello,
I have tried to follow the instructions of this series of posts to use a docker licence I have obtained within the WLM. However, I cannot get the licence to work.
Is there any detailed instructions that can be of help?
Many thanks.
Regards,
0 -
Hi Alvaro,
I noticed this also. In addition to the WLM, I set up a local academic license and install it if the WLM fails. I store all the info in a CSV (gurobi.csv) with the following headers.
WLSACCESSID,LICENSEID,WLSSECRET,LOCAL
and then run the following
#read in licence info from CSV as abovegurobi_licence = pd.read_csv(pth +'RBSC/gurobi.csv')print("Required info for Gurobi:", gurobi_licence.columns)try:#web license: try to access it via university for first-time access.e = gp.Env(empty=True)#e.setParam('OutputFlag', 0)e.setParam('WLSACCESSID', gurobi_licence.WLSACCESSID[0])e.setParam('LICENSEID', gurobi_licence.LICENSEID[0])e.setParam('WLSSECRET', gurobi_licence.WLSSECRET[0])e.start()except:#location of grbgetkey!chmod 755 /content/gdrive/My\ Drive/Colab\ Notebooks/SVM\ MVO/gurobi/grbgetkey#run grbgetkey with local license!/content/gdrive/My\ Drive/Colab\ Notebooks/SVM\ MVO/gurobi/grbgetkey {gurobi_licence.LOCAL[0]}e = gp.Env(empty=True)#chmod 755 grbgetkeye.start()Hope that helps,David0 -
Thanks for your reply.
I found this post in the Gurobi Support Portal and it really helped.
Regards,
Álvaro.
0
Please sign in to leave a comment.
Comments
8 comments