Skip to main content

CLI tool for Liquid Labs on-prem stack

Project description

Liquid Labs CLI

Command line interface for managing Liquid Labs on-prem stack.

Installation

pip install liquidai-cli

A docker-compose.yaml file is also shipped together with the package. Any changes to this file may cause some unexpected behaviors.

Run with uv

uv allows to run this tool without installing the package into the system.

uv run --directory [PATH_TO_THIS_DIRECTORY] liquidai [command] [args]

Configuration

The CLI uses a YAML configuration file (liquid.yaml) in your working directory. A default configuration will be created on first use, but you can customize it:

stack:
  version: "c3d7dbacd1"
  model_image: "liquidai/lfm-7b-e:0.0.1"
  api_secret: "local_api_token"
  # Other values will be auto-generated
database:
  name: "liquid_labs"
  user: "local_user"
  password: "local_password"
  port: 5432
  schema: "labs"

Usage

Stack Management

# Launch stack
liquidai stack launch

# Launch with upgrades
liquidai stack launch --upgrade-stack --upgrade-model

# Shutdown stack
liquidai stack shutdown

# Test API endpoints
liquidai stack test

# Purge stack (removes all components)
liquidai stack purge

# Purge without confirmation
liquidai stack purge --force

Model Operations

# Run a model in docker container
liquidai model run-model-image \
  --name lfm-3b-e \
  --image "liquidai/lfm-3b-e:0.0.6"

# Run a HuggingFace model and expose on port 9000
liquidai model run-hf \
  --name llama-7b \
  --path meta-llama/Llama-2-7b-chat-hf \
  --port 9000 \
  --gpu-memory-utilization 0.6 \
  --max-num-seqs 600 \
  --max-model-len 32768

# Run a local checkpoint and expose on port 9001 to avoid conflicts
liquidai model run-checkpoint \
  --path /path/to/checkpoint \
  --port 9001 \
  --gpu-memory-utilization 0.6 \
  --max-num-seqs 600

# List running models
liquidai model list

# Stop a specific model
liquidai model stop llama-7b

# Stop a model interactively
liquidai model stop

Database Operations

# Connect to database using pgcli
liquidai db connect

Infrastructure

# Create Cloudflare tunnel with token
liquidai tunnel create --token YOUR_TOKEN

# Create tunnel interactively
liquidai tunnel create

Configuration Management

# Import configuration from .env file
liquidai config import

# Import from specific .env file
liquidai config import --env-file /path/to/.env

# Import to specific config file
liquidai config import --config-file /path/to/liquid.yaml

# Force overwrite existing config
liquidai config import --force

Command Reference

Call liquidai [command] --help to get the detailed usage reference.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

liquidai_cli-0.0.1b0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

liquidai_cli-0.0.1b0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file liquidai_cli-0.0.1b0.tar.gz.

File metadata

  • Download URL: liquidai_cli-0.0.1b0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for liquidai_cli-0.0.1b0.tar.gz
Algorithm Hash digest
SHA256 7d6c10cfba0b59e38f7d223c1061cda52ed4ee36b6184dc5e5e3cf314dbbfddc
MD5 53b15e856a9069d6533b7451bb80da5a
BLAKE2b-256 1dc2ef3e853663d084262c3dd191fcdac09daa1321bb9bbd63ddb47684792625

See more details on using hashes here.

File details

Details for the file liquidai_cli-0.0.1b0-py3-none-any.whl.

File metadata

  • Download URL: liquidai_cli-0.0.1b0-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for liquidai_cli-0.0.1b0-py3-none-any.whl
Algorithm Hash digest
SHA256 32844ef4cf6cf8bf337101f2815762934da4dde782c794d0118332d71c92974f
MD5 1b5d2f8be6ff8289d03e9094629dea50
BLAKE2b-256 aa23963099b084528bd1010bbf3b7f85c426cf2b90b2317f7d491917a0f46480

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page