shlogg · Early preview
Gabriel Lavoura @lavouragabriel

Install Ollama On Google Colab With Colab-xterm

Install colab-xterm to access terminal in Google Colab. Install Ollama using shell script & test environment with `ollama list`. Clear Ollama models when done.

Ok, this is just another "how-to on Google Colab" tutorial... but the purpose of this post is more like a note for my future self.

  
  
  Step 1 - Install colab-xterm

First, we need to have access to a terminal within the Google Colab code cell. This way, we can install Ollama using the shell script approach.

!pip install colab-xterm  
%load_ext colabxterm

    
    

    
    




This script will install the colab-xterm package (Perhaps an awesome tool! Thanks @popcornylu, you're awesome!), which allows us to use a terminal within our Colab notebook,  even on the free tier.


  
  
  Ste...