Notebooks

TIR Notebooks are fully collaborative environments that make AI development possible. They combine power of containers, jupyter labs and AI/ML frameworks to create a readily usable workspace for you and your entire team.

Some of the most common use cases are:

  • Run a script or notebook to fine-tune a Large Language Model (LLM) on single GPU using pytorch or huggingface train

  • Run a script or notebook to tokenize and fine-tune LLMs or Diffusion models with with multiple GPUs (single machine) using deepspeed and accelerate

  • Open and run a jupyter notebook (.ipynb) from the platforms like github, kaggle or collab

  • Download and review datasets stored on TIR or other platforms like huggingface

  • Download and test models like stable diffusion, or any LLM

Note

A TIR notebook is fully functional coding environment.

If you prefer to work with command line (shell) over jupyter labs, you can configure ssh on a notebook. This way you can upload your data using sftp or sync your code with git tools and run the scripts as you would on your local system.

Getting Started

  1. Go to TIR Dashboard

  2. Create or Select a project

  3. Click on Notebooks in side-bar section

  4. Click CREATE NOTEBOOK

  5. Choose an appropriate name for your notebook

  6. Select a notebook type as NEW NOTEBOOK. If you want to open a notebook found on other platforms like github or google collab, you can choose IMPORT NOTEBOOK option which allows entering the URL of the target notebook.

  7. Next, you can select from pre-built or one of your own images. For the sake of simplicity, Click on Pytorch 2 option

  8. Next, you can choose a CPU or GPU plan. Feel free to choose Free Tier plan for this exercise

  9. (Optional) Set Enable SSH Access switch to enabled and add or select your SSH key.

  10. Leave the rest of the options as-is and click CREATE

  11. Next, you will see a new notebook appear in the list of notebooks. Wait for the notebook to come to a ready state.

  12. When the notebook is ready, you will see both Jupyter labs and SSH options (if configured). Choose any of these to access the notebook environment and work on your magic.

Notebook options

TIR notebooks are extremely powerful and flexible. While most configurations have a default to make our life eaiser, sometimes you may need to tweak the knobs. The following are the configurations that you can tweak in a notebook environments:

  • Enable SSH: You can enable SSH access on the notebook using public key or password (not recommended). If you decide to enable ssh after starting a notebook, you will have to first stop the notebook before you make changes.

  • Disk Size: Each TIR Notebook can have a disk size upto 1000GB. The default is 30GB. The selected disk will be mounted at /home/jovyan in your notebook environment. We recommend using this path as your workspace so in case of restarts, your content will be persistent. Since, TIR is container-native, the changes that you make to any other paths on the notebook will not be persisted on restarts. You can extend the disk size after the start of notebook as well. This workspace will be deleted when the associated notebook is deleted.

    Note

    Please raise a support ticket if you need more than 1TB of disk workspace.

  • Local NVME Storage: Only available for H100 plans. This fast local storage will be available at /mnt/local andonly for the duration of run. We recommend using this path when you need faster writes (e.g. save model checkpoints) or reads. Be sure to move this data to EOS bucket or under /home/jovyan before shutting down the notebook. This type of storage is fixed and can not be expanded at anytime during the notebook cycle.

  • Plan (Pricing): You can choose between an hourly or committed plan. We recommend using committed plans as they offer discounts and also may offer access to local NVME storage (for H100 plans only).

  • Notebook Image: TIR environments are container-native. You can use pre-built images with well known frameworks like pytorch, tranformers or customise the pre-built images. You can make your own images TIR-compatible using image builder utility. We recommend starting with pre-built images. In case you need to install packages from pip or apt-get, we recommend doing so from a jupyter notebook (.ipynb) or maintaining requirements.txt.

  • Configuration: TIR offers a variety of cpu and gpu options. We recommend using A100 or H100 for best performance.

  • Update Notebook: You can upgrade or downgrade both the configuration (e.g. upgrade from cpu to gpu) and Plan (e.g. hourly to commited) of a notebook if desired. This is useful option when restarting notebooks and the original hardware plan (gpu) on the notebook is no longer available.

  • Stop Notebook: If the plan and configuration allows, you can stop a notebook and restart. In case of hourly plan, you will not be billed for the GPU or GPU when notebook is in a stopped state. However, if your disk usage is beyond free tier, you will be charged for it.

  • Delete Notebook: When a notebook is deleted, all the resources associated with it will be deleted including the workspace (disk).

Notebook Statuses

  • Waiting: The notebook instance is being deployed on the hardware of your choise.

  • Running: The notebook is active and you can use either jupyter labs or ssh (if enabled) to access it.

  • Stopped: The notebook is not assigned to any machine. However, the workspace (disk mounted at /home/jovyan) will continue to exist until you delete the notebook. Depending on the size of the disk, you will charged for the usage.

How to create Notebook ??

To create a Notebook you have to click on Create Notebook which is at the left corner of the page.

../_images/Notebook1.png

After clicking on the Create Notebook button a page will appear, now enter Notebook name, choose the Notebook Image and select the machine on which you want to run your service, and then choose the plan, After that click on Create button.

../_images/Notebook2.png

After entering all the details Disk Size, Datasets and ssh key you will click on the create button for creating a notebook.

../_images/notebookenablesshkey.png ../_images/gpu_notebook_update1.png

After clicking on the create button your GPU will be created and it will be shown like this.

../_images/note_book_overview2.png

Notebook Details

Overview

You can see the Notebook Details, Plan Details under Overview tab.

../_images/note_book_overview3.png

Disk Size

You can see the details disk size and also You can change the Disk size as per your requirements.

../_images/Notebook6.png

For updating the disk size you have to change the disk size and then click on update button.

../_images/Notebook7.png

Metrics

You can see the Metrics graph in CPU Utilization , Memory Utilization & Interval.

../_images/Notebook8.png

You can see the one month activity as per your requirement in days & hours.

../_images/Notebook9.png

Associated Datasets

You can also see the Associated Datasets with two different datasets- Mounted & Unmounted. You can also Unmount.

../_images/Notebook10.png

SSH Key

You can see the SSH Key Details under ssh key tab.

../_images/note_book_ssh1.png

Update SSH Key

Note

Only one SSH key can be added to a nLaunch Notebook from Sidebar


You can launch the notebook from the left side of the Notebook name .

../_images/Notebook17.png

otebook

Note

When user want to change ssh key kindly first stop the notebook then change the ssh key

../_images/change_ssh-key1.png

Add SSH Key After Notebook Creation

Note

When user want to add ssh key after Notebook creation, kindly first stop notebook then add ssh key

../_images/afternotebook_cration1.png ../_images/sshkeynotebook2.png

Notebook Actions

You can see the actions like Launch Notebook, Stop, Update Notebook, Delete.

../_images/Notebook11.png

Launch Notebook

After clicking on Launch Notebook, Notebook will be launched and it should be visible like this.

../_images/Notebook12.png ../_images/Notebook13.png

Stop

For Stopping the Notebbok you have to click on Stop button and the Notebook will be stopped.

../_images/Notebook14.png

Update Notebook

You can update Notebook, For updating the Notebook You have to click on Update button.

../_images/Notebook15.png

Note

Notebook must be in Stop state before updating the Notebook.

Delete Notebook

For Deleting the Notebook you have to click on Delete button.

../_images/Notebook16.png

Launch Notebook from Sidebar

You can launch the notebook from the left side of the Notebook name .

../_images/Notebook17.png