# Guide for Github Action Runner

## Configure

The runner toolkits are installed at `~/runner`.

We have to configure it at the first time, after that you can start this runner.

```shell
cd ~/runner

export GH_REPO=your/github_repository
export TOKEN=your_github_action_token
./config.sh --url $GH_REPO --token $TOKEN

```

## Start Runner

```shell
cd ~/runner
./run.sh
```

## Delete Runner

```shell
cd ~/runner

export TOKEN=your_github_action_token
./config.sh remove --token $TOKEN
```

## Attention

* Pros of HFSpace-hosted runner
  * **Larger free disk space** (github action: 14G, hfspace: 50G)
  * Highly-customizable running environment.
* Cons of HFSpace-hosted runner
  * **Much slower CPU speed** (time cost approx x2.5 of github action when running model inference)
  * Many actions on github action market not compatible with non-github-action environments.
* You have to customize your own running environment manually, by editing `Dockerfile` and rebuilding space.
* **You don't have the root permission on hfspace runtime.** You have to install all the root-required dependencies (e.g. `apt/yum install xxx`) at docker build stage. The other dependencies (e.g. `pip install xxx`) can be installed at runtime.