# Run on Gradient (GitHub badge)

![Run on Gradient Badge attached to a GitHub repo](https://1320806315-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-M0Kx_QGNnwNbfrVe7sm%2F-M0Kym_UTjnWeax1ah7B%2FScreen%20Shot%202020-02-17%20at%208.47.13%20PM.png?alt=media\&token=bc7a8647-0d23-481b-b413-37e40fcfb448)





## What is it?

The Run on Gradient badge allows you to run a Gradient Notebook from any public GitHub repository on a free GPU. Gradient Notebooks are 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 will take you to a static page where you can view the full contents of the notebook. From this page, you can either sign in or create an account to run the notebook for free. Making an account is completely free and can be done in a few clicks by signing up with Google, GitHub, or email. Then just select “Run Notebook on a Free GPU” and Gradient will spin up a free, fully interactive notebook instance.

![](https://1320806315-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-MF5xeW-_Q_x3wOkMpsU%2F-MF5yRAL5TsiB379unvz%2FScreen%20Shot%202020-08-19%20at%209.47.39%20AM.png?alt=media\&token=7f64efa7-08a7-41c5-80f1-42cdf89bf6ba)

![](https://1320806315-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-MF5xeW-_Q_x3wOkMpsU%2F-MF5yUc32lMg37tHsSqg%2FScreen%20Shot%202020-08-19%20at%209.47.54%20AM.png?alt=media\&token=50ccf88d-a41e-4b25-a80d-7c544f3c1e06)

## Using the "Run on Gradient" badge

Simply add the following code snippet to your `Readme.md` on your 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 to.

### **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.&#x20;

### Where can I find the "Run on Gradient" Badge

The badge can be found here: [https://assets.paperspace.io/img/gradient-badge.svg](https://assets.paperspace.io/img/gradient-badge.svg) .&#x20;

It looks like this:

![Run on Gradient Badge](https://assets.paperspace.io/img/gradient-badge.svg)

