Sunday, July 26, 2020

How to setup Conda in Google Colabs to do GPU programming in Python?

  Conda is an open source package management and environment management system from Anaconda that would allow us to work across the platforms and languages. The conda also facilitates to programming GPUs in python using other modules from Anaconda such as numpy, scipy, numba etc. It uses the Cuda framework behind. Though the colabs notebooks are pre-built some of the above packages and python, it has not been pre-built with conda.
  Let us see how to install the conda in Colabs. I've made it simple for you. You only need to import an execute the following Jupyter Notebook available at Github.
  1. Download Jupyter Notebook ipynb file from the following Github link.
  2. Create an empty notebook in Colabs.
  3. Import the file into the notebook.
  4. Execute every code section in the notebook. Make sure the previous one has got success before move onto the next one. You may skip the sections that are used to check the versions after installations.
  5. Instructions are given there also.

Important: These installations are specific to notebooks. So, the Conda will only work within the notebook from where you install it. Don't forget to change the notebook to the GPU mode before executing any Cuda codes. It will not work otherwise.
  1. Runtime from the top menu
  2. Change runtime type
  3. Choose Hardware accelerator as GPU and save it.

Whola! you can now be experiencing the GPU python programming in Colabs.

Thanks for reading!
Please share if you find it useful!
Subscribe with your email to receive New updates

No comments:

Post a Comment

Whats New

How redundant uploads can be avoided in social media apps?

People spend more time on social media, and it influences the most and changes to societies. They want to share photos and videos often when...

You may also like to read

x

emailSubscribe to our mailing list to get the updates to your email inbox...

Delivered by FeedBurner