Skip to main content

canfar-lab

The canfar lab commands you run inside an AstroAI session on the CANFAR Science Platform. The same tree is the standalone canfar-lab binary.

Start and stop sessions with canfar (or the Science Portal). Inside the session, canfar lab does three jobs:

  1. Project env — init / clone / save / resume (lockfiles on /arc)
  2. Ray cluster — cluster start / status / run / jobs
  3. Agents — agent setup / install / verify
flowchart LR
  subgraph laptop [Laptop or portal]
    Portal[Science Portal]
    CanfarCLI["canfar login / create"]
  end
  subgraph session [AstroAI session]
    Lab["canfar lab"]
    Tools["pixi / uv / Jupyter / CADC / Ray"]
  end
  Portal --> session
  CanfarCLI --> session
  Lab --> Tools
Name Meaning
AstroAI Product: GitHub astroai, Harbor astroai
CANFAR Host platform: portal, Skaha, /arc, auth
canfar Platform CLI — sessions and canfar data
canfar lab / canfar-lab This package, inside a session
images.canfar.net/astroai/* Session images

Images: canfar-containers.

Inside a session

canfar lab                      # status banner
canfar lab init mylab           # or: clone owner/repo
canfar lab save                    # lockfile snapshot to /arc
canfar lab resume mylab
canfar lab status                  # quotas, sessions (not the Ray cluster)

canfar lab cluster start
canfar lab cluster status
canfar lab run train.py --cpus 2

canfar lab kernel ensure
canfar lab agent setup

canfar lab status is this session’s CPU/disk/quota. canfar lab cluster status is whether the Ray cluster is up. canfar lab cluster stop tears down workers and the manager.

Help: canfar lab help · one command: canfar lab help -c cluster · cheat sheet: docs/help.md

Install

pip install canfar-lab
canfar-lab --help

Do not pass --user. On a CANFAR session that writes /arc/home/.local. If the image Python is not writable, uv pip install --python /opt/canfar canfar-lab. Upgrade with pip install -U canfar-lab. Session images that already include the package put canfar-lab on PATH.

Docs

Doc What it is
docs/help.md Cheat sheet
docs/USAGE.md Storage, workflows, Ray, agents
docs/cli.md Flags and every command
docs/config.md Optional ~/.astroai/lab/config.yaml
docs/concurrency.md Shared home: locks, atomic writes, agent runtime placement
docs/studio.md AstroAI Studio: the browser coding portal, its dsh profile, teams, storage split
docs/desk-sync.md Desk cockpit and CANFAR ↔ desktop sync (design proposal)
docs/panel.md AstroAI Panel / Studio Team review (keys only; models in dsh Settings)

Data movement is not this CLI. Use canfar data and vcp / vls.

Development

./scripts/ci.sh
pixi run test

MIT. canfar keeps its own license.

Metadata

Release files for canfar-lab 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for canfar-lab 0.7.0
File Size Uploaded Provenance
canfar_lab-0.7.0.tar.gz 717.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for canfar-lab 0.7.0
File Interpreter ABI Platform
canfar_lab-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.3 MB

Release files / canfar_lab-0.7.0.tar.gz

Download URL canfar_lab-0.7.0.tar.gz
Size 717.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8268368a17dd5715886f7d65bb44eaaa506dc1bafc413124f6f20c25f15cf9ff
BLAKE2b-256 checksum
How to use checksums
7b590005d1c76375cb1b5518bdbeaec415033826fb05320db3c76fbb68cf4dce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / canfar_lab-0.7.0-py3-none-any.whl

Download URL canfar_lab-0.7.0-py3-none-any.whl
Size 562.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4661ee1f7e63135cb42c0d3ffb04e5f8e888949f65923e93d67c65a0865f01eb
BLAKE2b-256 checksum
How to use checksums
b4f82895e230144c0fc5c2ad7e6b890c07acb579cb1283257b5304cacf7aa804
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Security for canfar-lab 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page