Skip to content

Pre-work

The labs in the workshop are Jupyter notebooks. The notebooks can be run on your computer or remotely on the Google Colab service. Check out Running the Granite Notebooks section on how to setup the way you want to run the notebooks.

Running the Granite Notebooks

The notebooks can be run:

Follow the instructions in one of the sections that follow on how you would like to run the notebooks.

Running the Granite Notebooks Locally

It is recommended if you want to run the lab notebooks locally on your computer that you have:

  • A computer or laptop
  • Knowledge of Git and Python

If not, then it recommended to go to the Running the Granite Notebooks Remotely (Colab) section instead.

Running the lab notebooks locally on your computer requires the following steps:

Local Prerequisites

  • Git
  • Python 3.10, 3.11, or 3.12

Clone the Granite Timeseries Workshop Repository

Clone the workshop repo and cd into the repo directory.

git clone https://github.com/ibm-granite-community/granite-timeseries-workshop.git
cd granite-timeseries-workshop

Install Jupyter

Use a virtual environment

Before installing dependencies and to avoid conflicts in your environment, it is advisable to use a virtual environment (venv).

  1. Create virtual environment:

    python3 -m venv --upgrade-deps --clear venv
    
  2. Activate the virtual environment by running:

    source venv/bin/activate
    
  3. Install Jupyter notebook in the virtual environment:

    python3 -m pip install --require-virtualenv notebook ipywidgets
    

    For more information, see the Jupyter installation instructions

  4. To open a notebook in Jupyter (in the active virtual environment), run:

    jupyter notebook <notebook-file-path>
    

Running the Granite Notebooks Remotely (Colab)

Running the lab notebooks remotely using Google Colab requires the following steps:

Colab Prerequisites

  • Google Colab requires a Google account that you're logged into