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

Python api running in google colab #928

Closed
salmagro opened this issue Feb 24, 2021 · 3 comments
Closed

Python api running in google colab #928

salmagro opened this issue Feb 24, 2021 · 3 comments

Comments

@salmagro
Copy link

salmagro commented Feb 24, 2021

Dear awesome ESRI community.

Are there plans or a method to run the API and the deep learning capabilities in google colab?

If yes, what will be the process to have it running?

There is some discussion around this topic on googlecolab/colabtools#498 and googlecolab/colabtools#1255

Appreciate your comments.

@priyankatuteja
Copy link
Collaborator

@salmagro Thanks for reaching out to us.

Steps for using arcgis api for python and deep learning capabilities on google colab:

  1. Run the following block of code in one cell.
%%bash
MINICONDA_INSTALLER_SCRIPT=Miniconda3-4.5.4-Linux-x86_64.sh
MINICONDA_PREFIX=/usr/local
wget https://repo.continuum.io/miniconda/$MINICONDA_INSTALLER_SCRIPT
chmod +x $MINICONDA_INSTALLER_SCRIPT
./$MINICONDA_INSTALLER_SCRIPT -b -f -p $MINICONDA_PREFIX

conda install -c esri -c fastai -c pytorch -c anaconda arcgis=1.8.4 ujson scikit-image=0.15.0 pillow=7.1.2 libtiff=4.1.0 fastai=1.0.60 pytorch=1.4.0 torchvision=0.5.0 python=3.7.9 --yes --no-pin
  1. Run the following block of code in another cell.
import sys
sys.path
 
 
import sys
_ = (sys.path
 .append("/usr/local/lib/python3.7/site-packages"))
  1. Continue with usual workflow, to refer please see this notebook.

Steps to run arcgis without deep learning capability:

  1. Run the following block of code in one cell.
%%bash
MINICONDA_INSTALLER_SCRIPT=Miniconda3-4.5.4-Linux-x86_64.sh
MINICONDA_PREFIX=/usr/local
wget https://repo.continuum.io/miniconda/$MINICONDA_INSTALLER_SCRIPT
chmod +x $MINICONDA_INSTALLER_SCRIPT
./$MINICONDA_INSTALLER_SCRIPT -b -f -p $MINICONDA_PREFIX

conda install -c esri arcgis --yes --no-pin
  1. Run the following block of code in another cell.
import sys
sys.path
 
 
import sys
_ = (sys.path
 .append("/usr/local/lib/python3.7/site-packages"))
  1. Continue with usual workflow, to refer please see this notebook.

Please note: Third party map widgets do not display in colab's env.

@priyankatuteja
Copy link
Collaborator

priyankatuteja commented Feb 26, 2021

@salmagro We are glad to tell that, we offer ArcGIS Notebook Server with a ready to use deep learning environment which is GPU enabled.
image

To utilize GPU, create a notebook using 'Advanced with GPU support' option.

@schenardi
Copy link

I was not successful with the hints of @priyankatuteja to make arcgis deep learning running in colab. Since I do not want to move everything inside ArcGIS Notebook server (for cost reason but also because I do not have it in my developer account) it would be very desirable that Esri supports common patterns/environments for python and machine learning.

We all want to bring GIS and ML together and this only works with useful setups.

Thanks for leaving the "GIS-Bubble"...

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

4 participants