Skip to content

Commit

Permalink
Merge pull request #3 from NERC-CEH/data
Browse files Browse the repository at this point in the history
Updated cml notes
  • Loading branch information
matthewcoole authored Sep 12, 2024
2 parents 87425ed + cbbe727 commit 8bd3283
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cml.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ $ cml runner launch \
--labels="cml,gpu" \
--idle-timeout=3000
```
replacing `REPO_URL` with your github repository url and `ACCESS_TOKEN` with you gh access token.
replacing `REPO_URL` with your github repository url and `ACCESS_TOKEN` with you gh access token (created via `<USER> > Settings > Developer settings > Personal access tokens > Tokens (classic) > Generate new token (classic)`). Note that `REPO_URL` should **not** include the `.git` suffix.

The runner should provide a confirmation message when it is started, but you can check that it is available to your repository by going to github `<REPOSITORY> > Settings > Actions > Runners` and you should see the runner listed.

To ensure that the runner can also write back to gh actions you must set read/write permissions on the repository via `<REPOSITORY> > Settings > Actions > General > Workflow permissions > Read and write permissions`.

### GH Action
With the runner available you should now be able to create a workflow to utilise it. Below is an example of a basic action to use the local runner and print the available GPU spec and details:
```yaml
Expand All @@ -35,4 +37,4 @@ jobs:
run: |
nvidia-smi
```
Save this into `.github/workflows/test_gpu.yaml` and open a pull request. The action should execute and the output should provide you details about the available GPU.
Save this into `.github/workflows/test_gpu.yaml` and open a pull request. The action should execute and the output should provide you details about the available GPU.

0 comments on commit 8bd3283

Please sign in to comment.