Skip to main content

Quickstart

Access to the market generally happens through the cedana-cli tool, which acts as a CLI frontend for the market. Below, you can find a guide to get you started in under 5 minutes.

You can find configuration options or learn more about the market in the sidebar.

Getting cedana-cli

To get the client, you can either pull from source and build with:

  git clone git@github.com:cedana/cedana-cli.git
cd cedana-cli
go build

or install using our brew or apt sources.

Ubuntu

  curl -s https://packagecloud.io/install/repositories/nravic/cedana-cli/script.deb.sh | sudo bash
sudo apt install cedana-cli

MacOS

   brew tap cedana/cedana-cli 
brew install cedana-cli

Both sources currently update frequently, so use the respective update commands to keep the software up to date.

Authentication

You should have been given cluster information or have had a cluster set up on your behalf by someone at Cedana. Use it to register an account with the market:

    cedana-cli managed register <url>

Once registered, a sample configuration like below is created in ~/.cedana/cedana_config.json. Edit this to include cloud information and credentials, then run:

    cedana-cli managed bootstrap
{
"aws": {
"image_id": "",
"launch_template": "",
"ssh_key_path": "",
"user": ""
},
"paperspace": {
"api_key": "",
"ssh_key_path": "",
"template_id": "",
"user": ""
},
"cedana_managed": true,
"keep_running": false,

"managed_config": {
"auth_token": "",
"market_service_url": "market-service-cedana-url.com",
"password": "",
"user_id": "b08599c4-b5b0-4ba6-880e-69f8164fb299",
"username": "nravic2@gmail.com"
},
}
  • Creating tasks with cedana-cli managed task create task.yml --label task123 passing a yml defined task to run:
instance_specs:
max_price_usd_hour: 0.2

work_dir: "work_dir"

task:
run:
"cd work_dir && ./simple_loop.sh"
  • Running the task with cedana-cli managed task run --label task123, which picks an optimal instance from the configured clouds and runs your workload on it.
  • Checkpoint the task with cedana-cli managed task checkpoint --label task123 which creates a checkpoint of the workload, using the checkpointing service highlighted below.
  • Restore the task with cedana-cli managed task restore --label task123, which restores the workload onto a new instance - optimally selected in the same way the original instance was.