
Daft Launcher CLI Tool
daft-launcher
is a simple launcher for spinning up and managing Ray clusters for daft
.
Goal
Getting started with Daft in a local environment is easy.
However, getting started with Daft in a cloud environment is substantially more difficult.
So much more difficult, in fact, that users end up spending more time setting up their environment than actually playing with our query engine.
Daft Launcher aims to solve this problem by providing a simple CLI tool to remove all of this unnecessary heavy-lifting.
Capabilities
What Daft Launcher is capable of:
- Spinning up clusters.
- Listing all available clusters (as well as their statuses).
- Submitting jobs to a cluster.
- Connecting to the cluster (to view the Ray dashboard and submit jobs using the Ray protocol).
- Spinning down clusters.
- Creating configuration files.
- Running raw SQL statements using Daft's SQL API.
Currently supported cloud providers
Usage
Pre-requisites
You'll need some python package manager installed.
We recommend using uv
for all things python.
AWS
If you're using AWS, you'll need:
- A valid AWS account with the necessary IAM role to spin up EC2 instances.
This IAM role can either be created by you (assuming you have the appropriate permissions).
Or this IAM role will need to be created by your administrator.
- The AWS CLI installed and configured on your machine.
- To login using the AWS CLI.
For full instructions, please look here.
Installation
Using uv
:
mkdir my-project
cd my-project
uv init
uv venv
source .venv/bin/activate
uv pip install daft-launcher
Example
All interactions with Daft Launcher are primarily communicated via a configuration file.
By default, Daft Launcher will look inside your $CWD
for a file named .daft.toml
.
You can override this behaviour by specifying a custom configuration file.
daft init-config
daft init-config my-custom-config.toml
daft up
daft up -c my-custom-config.toml
daft list
daft submit --working-dir <...> -- command arg1 arg2 ...
daft submit -c my-custom-config.toml --working-dir $WORKING_DIR -- command arg1 arg2 ...
daft sql -- "SELECT * FROM my_table WHERE column = 'value'"
daft sql -c my-custom-config.toml -- "SELECT * FROM my_table WHERE column = 'value'"
daft down
daft down -c my-custom-config.toml