Skip to content

Cml runner - #362

Merged
DavidGOrtega merged 130 commits into
masterfrom
cml-runner
Jan 23, 2021
Merged

DavidGOrtega merged 130 commits into
masterfrom
cml-runner

Conversation

@DavidGOrtega

@DavidGOrtega DavidGOrtega commented Dec 8, 2020 •

Copy link
Copy Markdown
Contributor

Introduces the cml-runner command. This command creates:

A runner based on a thin wrapper over the GL and GH runner:

  • same spec:
    • name
    • labels
    • idle-timeout
    • repo
    • token
    • driver
  • Unified logging
  • Easy to launch
  • Auto provision of cloud resources
  • Auto unregister and removal of cloud resources

Cloud

It can also launch the runner in any cloud supported by terraform-provider-iterative

Usage

Usage: cml-runner.js

Options:
  --version            Show version number                             [boolean]
  --labels             Comma delimited runner labels            [default: "cml"]
  --idle-timeout       Time in seconds for the runner to be waiting for jobs
                       before shutting down. 0 waits forever.     [default: 300]
  --name               Name displayed in the repo once registered
                                                     [default: "cml-cfwj9rrari"]
  --driver             If not specify it infers it from the ENV.
                                                   [choices: "github", "gitlab"]
  --repo               Specifies the repo to be used. If not specified is
                       extracted from the CI ENV.
  --token              Personal access token to be used. If not specified in
                       extracted from ENV.
  --cloud              Cloud to deploy the runner      [choices: "aws", "azure"]
  --cloud-region       Region where the instance is deployed. Choices:[us-east,
                       us-west, eu-west, eu-north]. Also accepts native cloud
                       regions.                             [default: "us-west"]
  --cloud-type         Instance type. Choices: [m, l, xl]. Also supports native
                       types like i.e. t2.micro
  --cloud-gpu          GPU type.              [choices: "nogpu", "k80", "tesla"]
  --cloud-hdd-size     HDD size in GB.
  --cloud-ssh-private  Your private RSA SHH key. If not provided will be
                       generated by the Terraform-provider-Iterative.
                                                                   [default: ""]
  --cloud-spot         Request a spot instance                         [boolean]
  --cloud-spot-price   Spot max price. If not specified it takes current spot
                       bidding pricing.                          [default: "-1"]
  -h                   Show help                                       [boolean]

Launch a local runner

cml-runner \
  --repo https://github.com/DavidGOrtega/3_tensorboard \
  --token xxxxx \
  --labels tf \
  --idle-timeout 180

Launch a cloud runner

cml-runner \
  --repo=https://github.com/DavidGOrtega/3_tensorboard   \
  --token=xxxxx   \
  --labels tf   \
  --idle-timeout 180   \
  --cloud aws \
  --cloud-region us-west \
  --cloud-type t2.micro \
  --cloud-spot

closes #363
closes #323
closes #354
closes #356
closes #309
closes #369
closes #378
closes #379
closes #380
closes #381
closes #376
closes #382

@restyled-io restyled-io Bot mentioned this pull request Dec 9, 2020
@restyled-io restyled-io Bot mentioned this pull request Dec 10, 2020
@restyled-io restyled-io Bot mentioned this pull request Dec 16, 2020
@restyled-io restyled-io Bot mentioned this pull request Dec 20, 2020
@DavidGOrtega

Copy link
Copy Markdown
Contributor Author

@elleobrien @dmpetrov we have spot instances available here

@DavidGOrtega

Copy link
Copy Markdown
Contributor Author

@elleobrien I fixed the git issue, you should not have that issue

@DavidGOrtega
DavidGOrtega merged commit c825ff9 into master Jan 23, 2021
@DavidGOrtega

Copy link
Copy Markdown
Contributor Author

Branch can not be deleted until fix of iterative/terraform-provider-iterative#46

DavidGOrtega added a commit that referenced this pull request Feb 8, 2021
* integration-tests

* squash

* n sudo

* sudo

* dvc version

* dvc version gh

* hello world docker

* aws

* aws

* no spot

* gpu

* gpu

* gpu

* fix workflow

* no opttopns

* eastus

* gl tags

* nvidia-smi

* wip

* Cml runner (#362)

* wip

* cml-runner

* no delete

* no delete

* pre-release

* wip merge

* wip

* check code

* fix tf diir

* wip

* merge wip

* wip

* before merge runner_path docker hardcoded

* sufo

* chmod

* chmod

* github sudo

* pass env

* remove cml-cloud-runner

* wip live test

* wip live test

* wip live test

* wip live test

* wip live test

* wip live test

* wip live test

* wip live test

* wip live test

* wip live test

* wip live test

* wip live test

* wip live test

* wip live test

* wip live test

* wip live test

* gitlab working

* gitlab path complete wip

* gitlab path complete wip

* gitlab path complete wip

* gitlab path complete wip

* gitlab path complete wip

* gitlab path complete wip

* gitlab path complete wip

* workdir

* workdir

* workdir

* workdir

* workdir

* workdir

* workdir

* workdir

* workdir

* workdir

* workdir

* workdir

* credentials

* gh

* gh

* gh

* gh

* gh

* gh

* gh

* gh

* cleanup

* upgrade tf

* upgrade tf

* basse64

* basse64 no quotes

* updated tf

* bump tf

* bump tf

* bump tf

* ssh

* tf provider

* lint

* integration test in workflow

* missing install

* link g

* sud link g

* sud link g

* cml workdir like tf

* remove request concurrency

* iterative_cml_runner

* bump tf

* remove tf ver to pick latest

* tf gh actions

* check tf version

* check tf version json

* check tf version json

* check tf version json

* check tf version json

* check tf version json

* no bash

* no bash

* no bash

* no bash

* no proomissify

* try execa

* tf version regex

* log exec

* proc error handler

* pip

* token

* exec throw std

* exec slice

* log success

* azure runner

* log execsync

* log execsync

* longer runner await

* idle-tmeout can be 0

* azure credentials

* Cml runner spot (#373)

* cloud-runner spot instances

* help cloud-spot-price

* remove dup credentials

* spot in  workflow

* spot in workflow

* name cant be repeated

* log preparing

* no tf fixed version

* gitlab gpu

* init-terraform

* shutdown-once

* await unregister

* prepare tf before checks

* gpu-flag

* cleanup code

* bump version

* no docker in docker

* docker

* docker

* docker

* docker no sudo

* docker usermod

* docker root

* docker root

* gh token

* checkbot

* Restyled by prettier (#384)

Co-authored-by: Restyled.io <[email protected]>

* create

* fix workflow

* fix workflow

* github actions

* comment

* cml-send-comment

* echo chatbot

* echo chatbot fix yaml

* echo chatbot fix yaml tab

* pr

* pr

* only commands

* bump version

Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant