Gradient Docs
Gradient HomeHelp DeskCommunitySign up free
Gradient Next
Gradient Next
  • About Gradient
  • Get Started
    • Quick Start
      • Install the Gradient CLI
    • Core Concepts
    • Organizing Projects
      • Secrets
      • Storing an API key as a Secret
    • Tutorials
      • Gradient Notebooks Tutorial
      • Gradient Workflows Tutorial
      • Gradient Deployments Tutorial
    • FAQ
    • Common Errors
  • Gradient Platform
    • Gradient Notebooks
      • Runtimes
      • Files and storage
      • Machines
      • Terminal
      • Shortcuts
      • Sharing
      • TensorBoard
      • Run on Gradient
    • Gradient Workflows
      • Basic operations
      • Understanding Inputs & Outputs
      • Workflow Spec
      • Gradient Actions
      • Environment Variables
      • Using YAML for Data Science
    • Gradient Deployments
      • Basic operations
      • Deployment Spec
  • Artifacts
    • Container Management
      • Custom Containers
    • Data
      • Versioned Data
        • Public Datasets Repository
        • Storage Providers
      • Persistent Storage
    • Models
      • Managing Models
        • Model Types & Metadata
        • Public Models
    • Code
    • Metrics
      • Push Metrics
      • View & Query Metrics
  • Gradient Cluster
    • Overview
      • Setup
        • Managed Private Clusters
        • Self-Hosted Clusters
          • Pre-installation steps
          • Gradient Installer CLI
          • Terraform
            • Pre-installation steps
            • Install on AWS
            • Install on bare metal / VMs
            • Install on NVIDIA DGX
          • Let's Encrypt DNS Providers
          • Updating your cluster
      • Usage
  • More
    • SDK
      • Projects Client
      • Models Client
      • Deployments Client
      • Workflows Client
      • SDK Examples
      • Full SDK Reference
    • Machine Types
      • Machine Tiers
      • Free Machines (Free Tier)
    • Your Account
      • Teams
        • Creating a Team
        • Upgrading to a Team Plan
      • Hotkeys
      • Billing & Subscriptions
        • Storage Billing
      • Public Profiles
    • Release notes
    • Roadmap
Powered by GitBook
On this page
  • Overview
  • How it Works
  • Using the Run on Gradient badge
  • Notes
  • FAQ
  • Does this work with private GitHub repos?
  • Where can I find the "Run on Gradient" Badge
  1. Gradient Platform
  2. Gradient Notebooks

Run on Gradient

This guide explains how to create your own Run on Gradient badge to make any notebook file in a GitHub repo work automatically on Gradient

PreviousTensorBoardNextGradient Workflows

Last updated 3 years ago

Overview

Run on Gradient is a badge for that makes any .ipynb file in a public git repo launchable in a notebook on Gradient equipped with a free GPU.

Gradient Notebooks is a hosted Jupyter notebook service from Paperspace that requires no setup and provides free access to computing resources including GPUs.

How it Works

The Run on Gradient badge allows you to run a Gradient Notebook from any GitHub repository.

Clicking the badge brings the user to a static page where they can view the full contents of a notebook generated from the repository .ipynb file.

From this page, the user can either sign in or create an account to run the notebook for free.

Paperspace accounts are free and access to a free-tier GPU-backed notebook does not require a credit card.

Using the Run on Gradient badge

To use the badge, add the following code snippet to README.md in a public GitHub repo:

[![Gradient](https://assets.paperspace.io/img/gradient-badge.svg)](https://console.paperspace.com/github/huggingface/nlp/blob/master/notebooks/Overview.ipynb)

The HTML equivalent is:

<a href="https://console.paperspace.com/github/huggingface/nlp/blob/master/notebooks/Overview.ipynb">
  <img src="https://assets.paperspace.io/img/gradient-badge.svg" alt="Run on Gradient"/>
</a>

Remember to replace the notebook URL in this template with the notebook you want to link.

The formula for the link is as follows:

https://console.paperspace.com/github/{github_file_path}.ipynb
https://console.paperspace.com/github/gradient-ai/GauGAN/blob/main/GauGAN_ML_Showcase/GauGAN_ML_showcase.ipynb

Notes

Workspace: When you launch a new notebook from this button, Gradient will pull in the individual .ipynb file (specified in the snippet above) as a workspace. Optionally, if you would like to pull in the entire cloned GitHub repo as a workspace, append a ?clone=true query parameter. Runtime: You can also optionally specify a Docker container to run this workspace in. You can point to any public container by appending ?runtime=paperspace/fastai where you replace paperspace/fastai with your container name.

FAQ

Does this work with private GitHub repos?

Currently, the 1-click "launch on gradient" button will only work with public GitHub repositories. If you would like to use a private GitHub repository or a container that is in a private registry, you can do so by clicking "Change instance type (advanced)" before running the notebook (or alternatively, visiting the "Create Notebook" page in the Paperspace Console.

Where can I find the "Run on Gradient" Badge

It looks like this:

Therefore if a file is located at then the correct Run on Gradient link would be:

The badge can be found here: .

Run on Gradient Badge
https://github.com/gradient-ai/GauGAN/blob/main/GauGAN_ML_Showcase/GauGAN_ML_showcase.ipynb
https://assets.paperspace.io/img/gradient-badge.svg
Example Run on Gradient badge.
Run on Gradient badges bring interactivity to GitHub repos
Clicking the badge brings the user to a static notebook page where they may run the notebook
New users may quickly signup for a free Paperspace account to run the notebook