Crates.io | lambda_cli |
lib.rs | lambda_cli |
version | 0.1.0 |
source | src |
created_at | 2024-05-27 12:18:03.635683 |
updated_at | 2024-05-27 12:18:03.635683 |
description | A Rust application to interact with the Lambda Cloud GPU API. |
homepage | |
repository | https://github.com/cybrly/lambda_cli |
max_upload_size | |
id | 1253316 |
size | 431,809 |
Lambda CLI is a command-line tool for interacting with the Lambda Labs cloud GPU API.
To use Lambda CLI, you need to have Rust and Cargo installed. You can install Rust and Cargo by following the instructions here.
Clone the repository and navigate to the project directory:
git clone https://github.com/cybrly/lambda_cli.git
cd lambda_cli
cargo build --release
Usage
Before using Lambda CLI, set your Lambda API key as an environment variable:
export LAMBDA_API_KEY=your_api_key
Run the CLI tool:
./target/release/lambda_cli [COMMAND]
Commands
Examples
Validate the API key:
./target/release/lambda_cli
List all available GPU instances:
./target/release/lambda_cli list
Start a GPU instance with the specified SSH key:
./target/release/lambda_cli start --gpu "gpu_1x_a10" --ssh "Chris"
Stop a specified GPU instance:
./target/release/lambda_cli stop --gpu "instance_id"
List all running GPU instances:
./target/release/lambda_cli running
Continuously find and start a GPU instance when it becomes available:
./target/release/lambda_cli find --gpu "8x_h100" --ssh "SSH_KEY_NAME" --sec 30