labagent 0.4.0__tar.gz → 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {labagent-0.4.0 → labagent-0.4.2}/MANIFEST.in +2 -2
- {labagent-0.4.0/labagent.egg-info → labagent-0.4.2}/PKG-INFO +35 -24
- labagent-0.4.2/README.md +78 -0
- {labagent-0.4.0 → labagent-0.4.2}/docs/account-cleanup.md +2 -2
- {labagent-0.4.0 → labagent-0.4.2}/docs/aml-lab-instructor.md +1 -1
- {labagent-0.4.0 → labagent-0.4.2}/docs/aml.md +1 -1
- labagent-0.4.2/docs/compute.md +131 -0
- {labagent-0.4.0 → labagent-0.4.2}/docs/e2e-test-plan.md +4 -4
- labagent-0.4.2/docs/gpu-notebooks.md +160 -0
- {labagent-0.4.0 → labagent-0.4.2}/docs/job-contract.md +4 -2
- labagent-0.4.2/docs/launch-files.md +42 -0
- {labagent-0.4.0 → labagent-0.4.2}/docs/packs.md +2 -0
- {labagent-0.4.0 → labagent-0.4.2}/docs/rag-local.md +6 -1
- labagent-0.4.2/docs/redis-migrate.md +25 -0
- labagent-0.4.2/examples/config.example.yaml +26 -0
- labagent-0.4.2/examples/launch.lambda.example.yaml +22 -0
- labagent-0.4.2/examples/launch.nebius.example.yaml +20 -0
- labagent-0.4.2/examples/launch.runpod.example.yaml +21 -0
- labagent-0.4.2/examples/launch.shadeform.example.yaml +20 -0
- labagent-0.4.2/examples/rulesets/legacy-cleanup.example.yaml +46 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/__init__.py +1 -1
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/llm.py +14 -1
- labagent-0.4.2/labagent/cli.py +328 -0
- labagent-0.4.2/labagent/compute/__init__.py +16 -0
- labagent-0.4.2/labagent/compute/cli.py +380 -0
- labagent-0.4.2/labagent/compute/errors.py +11 -0
- labagent-0.4.2/labagent/compute/keys.py +60 -0
- labagent-0.4.2/labagent/compute/lambda_cloud.py +287 -0
- labagent-0.4.2/labagent/compute/nebius.py +492 -0
- labagent-0.4.2/labagent/compute/nebius_devlab.py +169 -0
- labagent-0.4.2/labagent/compute/providers.py +491 -0
- labagent-0.4.2/labagent/compute/runpod.py +314 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/config.py +8 -5
- labagent-0.4.2/labagent/console.py +220 -0
- labagent-0.4.2/labagent/instances.py +133 -0
- labagent-0.4.2/labagent/packs/aml/rag/aggregate.py +63 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/rag/tools.py +18 -3
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/base.py +53 -3
- labagent-0.4.2/labagent/packs/gpu_notebooks/container.py +186 -0
- labagent-0.4.2/labagent/packs/gpu_notebooks/pack.py +801 -0
- labagent-0.4.2/labagent/packs/gpu_notebooks/remote.py +31 -0
- labagent-0.4.2/labagent/packs/gpu_notebooks/setup.sh +287 -0
- labagent-0.4.2/labagent/packs/redis_migrate/__init__.py +0 -0
- labagent-0.4.2/labagent/packs/redis_migrate/facts.py +44 -0
- labagent-0.4.2/labagent/packs/redis_migrate/pack.py +60 -0
- labagent-0.4.2/labagent/packs/redis_migrate/rules.py +113 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/registry.py +4 -1
- {labagent-0.4.0 → labagent-0.4.2}/labagent/run.py +2 -2
- labagent-0.4.2/labagent/spec.py +174 -0
- {labagent-0.4.0 → labagent-0.4.2/labagent.egg-info}/PKG-INFO +35 -24
- {labagent-0.4.0 → labagent-0.4.2}/labagent.egg-info/SOURCES.txt +50 -5
- {labagent-0.4.0 → labagent-0.4.2}/labagent.egg-info/requires.txt +2 -0
- {labagent-0.4.0 → labagent-0.4.2}/pyproject.toml +3 -2
- labagent-0.4.2/tests/__init__.py +0 -0
- labagent-0.4.2/tests/test_aml_docs.py +38 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_aml_rag.py +56 -0
- labagent-0.4.2/tests/test_cli_instances.py +170 -0
- labagent-0.4.2/tests/test_compute.py +146 -0
- labagent-0.4.2/tests/test_console.py +295 -0
- labagent-0.4.2/tests/test_data_files.py +204 -0
- labagent-0.4.2/tests/test_gpu_auto_cloud.py +107 -0
- labagent-0.4.2/tests/test_gpu_console.py +180 -0
- labagent-0.4.2/tests/test_gpu_container.py +142 -0
- labagent-0.4.2/tests/test_gpu_lambda.py +512 -0
- labagent-0.4.2/tests/test_gpu_mig_script.py +262 -0
- labagent-0.4.2/tests/test_gpu_nebius.py +583 -0
- labagent-0.4.2/tests/test_gpu_notebooks.py +689 -0
- labagent-0.4.2/tests/test_gpu_offers.py +294 -0
- labagent-0.4.2/tests/test_gpu_shared_key.py +199 -0
- labagent-0.4.2/tests/test_gpu_ssh_keys.py +277 -0
- labagent-0.4.2/tests/test_launch_file.py +205 -0
- labagent-0.4.2/tests/test_nebius_devlab.py +245 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_nl.py +2 -2
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_packs.py +2 -2
- labagent-0.4.2/tests/test_redis_migrate.py +218 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_repo_hygiene.py +3 -2
- labagent-0.4.2/tests/test_runpod.py +335 -0
- labagent-0.4.0/README.md +0 -69
- labagent-0.4.0/docs/aml/dataset-card-huggingface.md +0 -76
- labagent-0.4.0/docs/aml/kaggle-description.md +0 -28
- labagent-0.4.0/docs/blog/aml-lab.md +0 -46
- labagent-0.4.0/examples/config.example.json +0 -17
- labagent-0.4.0/examples/rulesets/legacy-cleanup.example.json +0 -16
- labagent-0.4.0/labagent/cli.py +0 -173
- labagent-0.4.0/tests/test_aml_docs.py +0 -65
- {labagent-0.4.0 → labagent-0.4.2}/CONTRIBUTING.md +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/LICENSE +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/SECURITY.md +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/docs/azure-labs.md +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/docs/dbx-lakehouse.md +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/docs/dbx-workspace.md +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/docs/examples/oidc-trust-policy.example.json +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/docs/examples/permissions-read.example.json +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/docs/examples/permissions-write.example.json +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/docs/examples/runner-workflow.example.yml +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/docs/rag-lab-instructor.md +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/docs/state-and-secrets.md +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/adapters.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/cli.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/client.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/config.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/embeddings.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/lab/01_chunking.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/lab/02_embeddings.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/lab/03_vector_store.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/lab/04_generation.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/lab/05_chroma_and_filters.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/lab/06_hybrid_search.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/lab/07_evaluation.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/lab/08_break_it.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/lab/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/lab/docs/ai_usage_guidelines.md +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/lab/docs/backup_and_recovery.md +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/lab/docs/expense_policy.md +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/lab/docs/remote_work_policy.md +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/lab/docs/vendor_risk_management.md +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/labkit.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/models.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/playground.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/ai/rag/samples.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/audit.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/cleanup.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/context.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/datasets.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/deleters.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/discovery.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/envelope.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/iam_ops.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/nl.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/copilot/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/copilot/exercises.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/copilot/guidance.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/copilot/office.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/copilot/package.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/copilot/select.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/corpus/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/corpus/build.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/corpus/documents.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/corpus/regs.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/data/reg_index.json +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/data/sdn_seed.json +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/export.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/gen/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/gen/__main__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/gen/builtin.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/gen/snapshot.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/lab/01_policy_search.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/lab/02_evidence_bundle.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/lab/03_citations_and_narrative.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/lab/04_triage_and_evaluation.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/lab/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/licences.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/names.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/pack.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/rag/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/rag/bundle.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/rag/qa.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/rag/quality.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/aml/schema.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/azure_labs/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/azure_labs/azcli.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/azure_labs/lifecycle.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/azure_labs/migrate.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/azure_labs/pack.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/azure_labs/safety.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/databricks/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/databricks/auth.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/databricks/cli.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/databricks/models.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/databricks/pg.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/db_agent/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/db_agent/pack.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/domains.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/guides/START_HERE.md +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/guides/healthcare.md +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/guides/retail.md +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/notebook.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/pack.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/sql/healthcare/01_bronze.sql +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/sql/healthcare/02_silver.sql +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/sql/healthcare/03_gold.sql +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/sql/healthcare/04_governance.sql +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/sql/retail/01_bronze.sql +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/sql/retail/02_silver.sql +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/sql/retail/03_gold.sql +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/sqlrun.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_workspace/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_workspace/guards.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_workspace/pack.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/dbx_workspace/tf.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/gitsrc.py +0 -0
- {labagent-0.4.0/labagent/packs/rag → labagent-0.4.2/labagent/packs/gpu_notebooks}/__init__.py +0 -0
- {labagent-0.4.0/tests → labagent-0.4.2/labagent/packs/rag}/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/app/app.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/app/app.yaml +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/app/requirements.txt +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/app/retrieval.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/app/static/index.html +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/chunking.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/sources/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/sources/datasets.json +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/sources/sec.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/tutorial/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/00_setup.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/01_data.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/02_embeddings.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/03_pgvector.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/04_search.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/05_answer_and_eval.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/06_deploy_app.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/99_cleanup.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/_common.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag/tutorial_pack.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag_ide/__init__.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag_ide/ec2.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag_ide/local.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag_ide/modal_gateway.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/packs/rag_ide/pack.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/plan.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/rules.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/secrets_box.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/sweep.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/cohort_iam/.terraform.lock.hcl +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/cohort_iam/main.tf +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/cohort_iam/outputs.tf +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/cohort_iam/sandbox-policy.json.tftpl +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/cohort_iam/tests/cohort.tftest.hcl +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/cohort_iam/variables.tf +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/cohort_iam/versions.tf +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/databricks_aws/.terraform.lock.hcl +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/databricks_aws/main.tf +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/databricks_aws/outputs.tf +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/databricks_aws/tests/workspace.tftest.hcl +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/databricks_aws/variables.tf +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/databricks_aws/versions.tf +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/databricks_azure/.terraform.lock.hcl +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/databricks_azure/main.tf +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/databricks_azure/outputs.tf +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/databricks_azure/tests/workspace.tftest.hcl +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/databricks_azure/variables.tf +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/databricks_azure/versions.tf +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/state_backend/.terraform.lock.hcl +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/state_backend/main.tf +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/terraform/state_backend/tests/bootstrap.tftest.hcl +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent/tf.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent.egg-info/dependency_links.txt +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent.egg-info/entry_points.txt +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/labagent.egg-info/top_level.txt +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/scripts/build_lakehouse_data.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/scripts/check_no_pii.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/scripts/make_test_job.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/setup.cfg +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/conftest.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_aml_copilot.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_aml_corpus.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_aml_generator.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_aml_lab.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_aml_nl.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_azure_labs.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_classify.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_cleanup.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_cloudfront_and_cli.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_datasets.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_db_agent.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_dbx_lakehouse.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_dbx_workspace.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_encoding.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_iam_ops.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_pack_jobs.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_packaging.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_plan.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_rag_app.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_rag_ide.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_rag_ide_ec2.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_rag_ide_local.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_rag_lab.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_rag_local.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_rag_sec.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_rag_tutorial.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_sweep_moto.py +0 -0
- {labagent-0.4.0 → labagent-0.4.2}/tests/test_tf_wrapper.py +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
include LICENSE README.md SECURITY.md CONTRIBUTING.md
|
|
2
2
|
recursive-include docs *.md *.yml *.json
|
|
3
|
-
recursive-include examples *.
|
|
3
|
+
recursive-include examples *.yaml
|
|
4
4
|
recursive-include scripts *.py
|
|
5
5
|
recursive-include tests *.py
|
|
6
6
|
recursive-include labagent/terraform *.tf *.tftpl *.hcl
|
|
7
7
|
recursive-include labagent/ai/rag/lab *.py *.md
|
|
8
8
|
recursive-include labagent/packs/dbx_lakehouse *.sql *.md
|
|
9
9
|
# never ship operational data or state
|
|
10
|
-
global-exclude *.tfstate *.tfstate.* *.tfvars *.pem job*.json result*.json plan*.json lab.json *.pyc
|
|
10
|
+
global-exclude *.tfstate *.tfstate.* *.tfvars *.pem job*.json job*.yaml job*.yml result*.json plan*.json lab.json lab.yaml lab.yml *.pyc
|
|
11
11
|
prune .venv
|
|
12
12
|
prune build
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: labagent
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Open-source CLI and AI agent to launch and tear down hands-on labs for RAG, LLM and Databricks, plus AWS and Terraform sandboxes.
|
|
5
5
|
Author: BeCloudReady
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -27,6 +27,7 @@ Description-Content-Type: text/markdown
|
|
|
27
27
|
License-File: LICENSE
|
|
28
28
|
Requires-Dist: boto3>=1.34
|
|
29
29
|
Requires-Dist: cryptography>=42
|
|
30
|
+
Requires-Dist: pyyaml>=6
|
|
30
31
|
Provides-Extra: rag
|
|
31
32
|
Requires-Dist: psycopg[binary]>=3.1; extra == "rag"
|
|
32
33
|
Provides-Extra: rag-local
|
|
@@ -52,6 +53,7 @@ Requires-Dist: langchain>=0.3; extra == "rag-lab"
|
|
|
52
53
|
Requires-Dist: qdrant-client>=1.9; extra == "rag-lab"
|
|
53
54
|
Requires-Dist: jupyterlab>=4; extra == "rag-lab"
|
|
54
55
|
Requires-Dist: ipykernel>=6; extra == "rag-lab"
|
|
56
|
+
Requires-Dist: ipywidgets>=8; extra == "rag-lab"
|
|
55
57
|
Provides-Extra: dev
|
|
56
58
|
Requires-Dist: pytest>=8; extra == "dev"
|
|
57
59
|
Requires-Dist: pydantic>=2; extra == "dev"
|
|
@@ -62,7 +64,9 @@ Requires-Dist: openpyxl>=3.1; extra == "dev"
|
|
|
62
64
|
Requires-Dist: python-docx>=1.1; extra == "dev"
|
|
63
65
|
Dynamic: license-file
|
|
64
66
|
|
|
65
|
-
# labagent:
|
|
67
|
+
# labagent: open-source hands-on Cloud & AI labs for technical training, workshops and hackathons
|
|
68
|
+
|
|
69
|
+
Currently works for AWS, Azure, Neo Cloud (Lambda, Nebius, Shadeform)
|
|
66
70
|
|
|
67
71
|
[](https://pypi.org/project/labagent/)
|
|
68
72
|
[](https://pypi.org/project/labagent/)
|
|
@@ -71,43 +75,56 @@ Dynamic: license-file
|
|
|
71
75
|
|
|
72
76
|
labagent builds a lab with one command and removes it with one more. Each lab is a **pack**: ordered, re-runnable steps. `launch` resumes after a failure. `destroy` removes only what the pack created.
|
|
73
77
|
|
|
74
|
-
|
|
78
|
+
Built for people who run labs for other people:
|
|
79
|
+
|
|
80
|
+
* Trainers and instructor-led training teams who set up the same hands-on lab for 5 to 50 learners every cohort
|
|
81
|
+
* Bootcamps, training academies and college courses that need GPU, Databricks, Azure or AWS virtual labs without buying a lab platform
|
|
82
|
+
* GPU and cloud providers who want developer adoption through workshops and hackathons running on their own capacity
|
|
83
|
+
|
|
84
|
+
## Install
|
|
85
|
+
Mac
|
|
75
86
|
```bash
|
|
76
87
|
brew install pipx && pipx ensurepath
|
|
77
88
|
pipx install labagent
|
|
78
89
|
```
|
|
79
|
-
|
|
90
|
+
Windows
|
|
80
91
|
```powershell
|
|
81
|
-
#
|
|
92
|
+
# Install prerequisites & labagent
|
|
82
93
|
winget install Python.Python.3.14
|
|
83
94
|
Invoke-WebRequest -Uri https://bootstrap.pypa.io/get-pip.py -OutFile get-pip.py
|
|
84
95
|
python get-pip.py
|
|
85
96
|
```
|
|
86
|
-
|
|
97
|
+
Linux
|
|
98
|
+
```bash
|
|
99
|
+
pip install labagent
|
|
100
|
+
```
|
|
101
|
+
## Use
|
|
87
102
|
```bash
|
|
88
|
-
pip install labagent # Mac: brew install pipx && pipx ensurepath && pipx install labagent
|
|
89
103
|
labagent packs # list labs (add --json for a machine-readable catalog)
|
|
90
104
|
labagent launch <pack> --name demo --param k=v # build or resume
|
|
91
105
|
labagent destroy <pack> --name demo # remove what launch created
|
|
92
106
|
```
|
|
93
107
|
|
|
94
|
-
Extras: `labagent[rag]` (Databricks RAG), `[rag-local]` (laptop RAG), `[rag-lab]` (laptop RAG with JupyterLab), `[aml]`, `[modal]`. Python 3.9+. On a Mac, use pipx (above): plain `pip install` puts `labagent` in `~/Library/Python/3.X/bin`, which is not on your PATH. Add `--dry-run` to any launch to see the steps.
|
|
95
|
-
|
|
96
108
|
## Packs
|
|
97
109
|
|
|
98
110
|
| Pack | What it builds | Where |
|
|
99
111
|
|---|---|---|
|
|
100
112
|
| `azure-labs` | Copy Azure VMs, disks and network from one resource group to another with snapshots, or snapshot a dead VM or disk. Source is read-only. An Azure Lab Services alternative. [Guide](docs/azure-labs.md) | Azure (needs `az login`) |
|
|
101
|
-
| `
|
|
113
|
+
| `gpu-notebooks` | Rent a GPU VM (Shadeform) and give each GPU slice its own JupyterLab, with a URL and login per lab. [Guide](docs/gpu-notebooks.md). See what to rent first: `labagent compute offers --cloud shadeform --gpu H100` ([compute](docs/compute.md)) | Shadeform (API key) |
|
|
102
114
|
| `db-agent` | [db-agent](https://github.com/db-agent/db-agent) text-to-SQL app on Databricks Apps, pinned commit. [Which model, warehouse and schema it picks](docs/packs.md) | Databricks Free Edition |
|
|
103
115
|
| `dbx-lakehouse` | Medallion lakehouse (bronze, silver, gold) from real open data, with masks, a row filter, notebooks and exercises. [Guide](docs/dbx-lakehouse.md) | Databricks Free Edition, AWS, Azure |
|
|
104
116
|
| `dbx-workspace` | Premium Databricks workspace via Terraform. Plan only unless `apply=yes`. [Guide](docs/dbx-workspace.md) | AWS or Azure (costs money) |
|
|
105
|
-
| `aml` | Synthetic anti-money-laundering lab with an answer key: RAG for developers, Microsoft 365 Copilot for staff. [Guide](docs/aml.md) | Your machine |
|
|
106
117
|
| `rag-ide` | Private browser VS Code per learner with the RAG lab | Modal, EC2 or Docker |
|
|
107
118
|
|
|
108
|
-
|
|
119
|
+
## Workshops, hackathons and instructor-led training
|
|
120
|
+
|
|
121
|
+
Put the whole event in one YAML file. Launch every learner's sandbox before the session, destroy them after, and pay only for the hours used:
|
|
109
122
|
|
|
110
|
-
|
|
123
|
+
```bash
|
|
124
|
+
labagent launch -f hackathon.yaml # one lab per learner
|
|
125
|
+
labagent destroy -f hackathon.yaml # removes everything the
|
|
126
|
+
```
|
|
127
|
+
## Azure Lab Services is retiring (June 28, 2027)
|
|
111
128
|
|
|
112
129
|
```bash
|
|
113
130
|
export LABAGENT_ALLOWED_AZURE_SUBSCRIPTIONS=$(az account show --query id -o tsv)
|
|
@@ -116,18 +133,12 @@ labagent launch azure-labs --name old1 --param source_rg=legacy-rg --param targe
|
|
|
116
133
|
labagent destroy azure-labs --name move1 --param target_rg=new-rg
|
|
117
134
|
```
|
|
118
135
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
## For AI coding agents and scripts
|
|
122
|
-
|
|
123
|
-
- Output is one JSON envelope on stdout (`status`: `ok`, `partial`, `failed`; `items` per step). Exit code 0, 1, 2. Logs go to stderr and never contain secrets.
|
|
124
|
-
- `labagent packs --json` lists every pack with parameters, defaults, platforms and cost tier.
|
|
125
|
-
- Every `launch` is idempotent. Run it again to resume. `destroy` deletes only resources carrying the pack's tags or state.
|
|
126
|
-
- Safety gates: `LABAGENT_ALLOWED_ACCOUNTS` (AWS), `LABAGENT_ALLOWED_SUBSCRIPTIONS` (Databricks on Azure), `LABAGENT_ALLOWED_AZURE_SUBSCRIPTIONS` (azure-labs). An empty list refuses to run.
|
|
127
|
-
- Plain English front end: `labagent "deploy rag-tutorial"` prints the command it understood and asks first (local Ollama or any OpenAI-compatible endpoint).
|
|
136
|
+
## Teaching with labagent?
|
|
128
137
|
|
|
129
|
-
|
|
138
|
+
labagent is free and open source. If you run cohorts and would rather not run the environments yourself, BeCloudReady runs managed hands-on labs for a fixed price per cohort, and builds custom packs for your course.
|
|
130
139
|
|
|
131
|
-
|
|
140
|
+
* Trainers and training companies: we're taking a few design partners for early 2027 cohorts, at cloud cost. Details on /labs.
|
|
141
|
+
* GPU and cloud providers: want a pack, hackathon or workshop driving developer adoption on your capacity? Open an issue or reach out through becloudready.com/labs.
|
|
142
|
+
* Upcoming: free GPU fine-tuning hackathon with TorontoAI, Dec 16, 2026, 5 PM ET. Every participant gets a GPU lab launched by labagent.
|
|
132
143
|
|
|
133
144
|
Apache-2.0. [SECURITY.md](SECURITY.md), [CONTRIBUTING.md](CONTRIBUTING.md), [docs/packs.md](docs/packs.md). Related: [db-agent](https://github.com/db-agent/db-agent), [labagent-datasets](https://github.com/becloudready/labagent-datasets). Maintained by [BeCloudReady](https://becloudready.com/).
|
labagent-0.4.2/README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# labagent: open-source hands-on Cloud & AI labs for technical training, workshops and hackathons
|
|
2
|
+
|
|
3
|
+
Currently works for AWS, Azure, Neo Cloud (Lambda, Nebius, Shadeform)
|
|
4
|
+
|
|
5
|
+
[](https://pypi.org/project/labagent/)
|
|
6
|
+
[](https://pypi.org/project/labagent/)
|
|
7
|
+
[](https://github.com/becloudready/labagent/actions/workflows/ci.yml)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
|
|
10
|
+
labagent builds a lab with one command and removes it with one more. Each lab is a **pack**: ordered, re-runnable steps. `launch` resumes after a failure. `destroy` removes only what the pack created.
|
|
11
|
+
|
|
12
|
+
Built for people who run labs for other people:
|
|
13
|
+
|
|
14
|
+
* Trainers and instructor-led training teams who set up the same hands-on lab for 5 to 50 learners every cohort
|
|
15
|
+
* Bootcamps, training academies and college courses that need GPU, Databricks, Azure or AWS virtual labs without buying a lab platform
|
|
16
|
+
* GPU and cloud providers who want developer adoption through workshops and hackathons running on their own capacity
|
|
17
|
+
|
|
18
|
+
## Install
|
|
19
|
+
Mac
|
|
20
|
+
```bash
|
|
21
|
+
brew install pipx && pipx ensurepath
|
|
22
|
+
pipx install labagent
|
|
23
|
+
```
|
|
24
|
+
Windows
|
|
25
|
+
```powershell
|
|
26
|
+
# Install prerequisites & labagent
|
|
27
|
+
winget install Python.Python.3.14
|
|
28
|
+
Invoke-WebRequest -Uri https://bootstrap.pypa.io/get-pip.py -OutFile get-pip.py
|
|
29
|
+
python get-pip.py
|
|
30
|
+
```
|
|
31
|
+
Linux
|
|
32
|
+
```bash
|
|
33
|
+
pip install labagent
|
|
34
|
+
```
|
|
35
|
+
## Use
|
|
36
|
+
```bash
|
|
37
|
+
labagent packs # list labs (add --json for a machine-readable catalog)
|
|
38
|
+
labagent launch <pack> --name demo --param k=v # build or resume
|
|
39
|
+
labagent destroy <pack> --name demo # remove what launch created
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Packs
|
|
43
|
+
|
|
44
|
+
| Pack | What it builds | Where |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| `azure-labs` | Copy Azure VMs, disks and network from one resource group to another with snapshots, or snapshot a dead VM or disk. Source is read-only. An Azure Lab Services alternative. [Guide](docs/azure-labs.md) | Azure (needs `az login`) |
|
|
47
|
+
| `gpu-notebooks` | Rent a GPU VM (Shadeform) and give each GPU slice its own JupyterLab, with a URL and login per lab. [Guide](docs/gpu-notebooks.md). See what to rent first: `labagent compute offers --cloud shadeform --gpu H100` ([compute](docs/compute.md)) | Shadeform (API key) |
|
|
48
|
+
| `db-agent` | [db-agent](https://github.com/db-agent/db-agent) text-to-SQL app on Databricks Apps, pinned commit. [Which model, warehouse and schema it picks](docs/packs.md) | Databricks Free Edition |
|
|
49
|
+
| `dbx-lakehouse` | Medallion lakehouse (bronze, silver, gold) from real open data, with masks, a row filter, notebooks and exercises. [Guide](docs/dbx-lakehouse.md) | Databricks Free Edition, AWS, Azure |
|
|
50
|
+
| `dbx-workspace` | Premium Databricks workspace via Terraform. Plan only unless `apply=yes`. [Guide](docs/dbx-workspace.md) | AWS or Azure (costs money) |
|
|
51
|
+
| `rag-ide` | Private browser VS Code per learner with the RAG lab | Modal, EC2 or Docker |
|
|
52
|
+
|
|
53
|
+
## Workshops, hackathons and instructor-led training
|
|
54
|
+
|
|
55
|
+
Put the whole event in one YAML file. Launch every learner's sandbox before the session, destroy them after, and pay only for the hours used:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
labagent launch -f hackathon.yaml # one lab per learner
|
|
59
|
+
labagent destroy -f hackathon.yaml # removes everything the
|
|
60
|
+
```
|
|
61
|
+
## Azure Lab Services is retiring (June 28, 2027)
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
export LABAGENT_ALLOWED_AZURE_SUBSCRIPTIONS=$(az account show --query id -o tsv)
|
|
65
|
+
labagent launch azure-labs --name move1 --param source_rg=legacy-rg --param target_rg=new-rg
|
|
66
|
+
labagent launch azure-labs --name old1 --param source_rg=legacy-rg --param target_rg=archive-rg --param snapshot_only=true
|
|
67
|
+
labagent destroy azure-labs --name move1 --param target_rg=new-rg
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Teaching with labagent?
|
|
71
|
+
|
|
72
|
+
labagent is free and open source. If you run cohorts and would rather not run the environments yourself, BeCloudReady runs managed hands-on labs for a fixed price per cohort, and builds custom packs for your course.
|
|
73
|
+
|
|
74
|
+
* Trainers and training companies: we're taking a few design partners for early 2027 cohorts, at cloud cost. Details on /labs.
|
|
75
|
+
* GPU and cloud providers: want a pack, hackathon or workshop driving developer adoption on your capacity? Open an issue or reach out through becloudready.com/labs.
|
|
76
|
+
* Upcoming: free GPU fine-tuning hackathon with TorontoAI, Dec 16, 2026, 5 PM ET. Every participant gets a GPU lab launched by labagent.
|
|
77
|
+
|
|
78
|
+
Apache-2.0. [SECURITY.md](SECURITY.md), [CONTRIBUTING.md](CONTRIBUTING.md), [docs/packs.md](docs/packs.md). Related: [db-agent](https://github.com/db-agent/db-agent), [labagent-datasets](https://github.com/becloudready/labagent-datasets). Maintained by [BeCloudReady](https://becloudready.com/).
|
|
@@ -31,7 +31,7 @@ without a type are rejected when the ruleset is loaded. A rule with `"enabled":
|
|
|
31
31
|
Match keys (all must match; a list means any entry): `type` (`service/type`), `region`, `name` (glob, case-insensitive),
|
|
32
32
|
`id`, `name_regex`, `tags` (`{"Key": "glob"}`), `tags_absent`, `older_than_days`, `unused_days`, `attrs` (exact match on
|
|
33
33
|
discovered attributes such as `enabled`, `attachments`, `aliases`). See `labagent/rules.py` for the full contract and
|
|
34
|
-
`examples/rulesets/legacy-cleanup.example.
|
|
34
|
+
`examples/rulesets/legacy-cleanup.example.yaml` for a starting point (JSON works too).
|
|
35
35
|
|
|
36
36
|
**Keep your real rulesets out of this public repo.** They contain your resource names. Store them in the private runner
|
|
37
37
|
repo (or the orchestrator) and pass them to the job.
|
|
@@ -47,7 +47,7 @@ repo (or the orchestrator) and pass them to the job.
|
|
|
47
47
|
| 5. Repeat | `pending` items (CloudFront, CloudFormation, throttled calls) return a `retry_after_s`. Re-run apply later | yes |
|
|
48
48
|
| 6. Re-audit | step 1 again. Remaining `review` items become new rules, or stay | no |
|
|
49
49
|
|
|
50
|
-
Locally: `labagent --config lab.
|
|
50
|
+
Locally: `labagent --config lab.yaml run --job job.json --ruleset rules.yaml --output result.json` (each file is JSON or YAML).
|
|
51
51
|
In CI: the same job through the private runner workflow (`docs/examples/runner-workflow.example.yml`); the orchestrator
|
|
52
52
|
supplies the ruleset in the job.
|
|
53
53
|
|
|
@@ -6,7 +6,7 @@ tool are described in [aml.md](aml.md).
|
|
|
6
6
|
|
|
7
7
|
**Audience:** developers who have done the [RAG lab](rag-local.md) (at least notebooks 1 to 6) and want to apply it to a regulated
|
|
8
8
|
domain. **Not for:** AML investigators who need to learn to *use* an AI assistant (use `mode=copilot`).
|
|
9
|
-
**Prerequisites:** Python functions, the RAG lab's `TinyStore` idea, `pip install -e '.[rag-local]'` and `jupyterlab`. No AML knowledge:
|
|
9
|
+
**Prerequisites:** Python functions, the RAG lab's `TinyStore` idea, `pip install -e '.[rag-local]'` and `jupyterlab ipywidgets`. No AML knowledge:
|
|
10
10
|
the policy text in the lab explains each rule, and the first notebook has learners read it.
|
|
11
11
|
|
|
12
12
|
## The design: demo first, then build
|
|
@@ -50,7 +50,7 @@ Learners do three tasks: ask policy questions and read the citations, pull the *
|
|
|
50
50
|
| 4 | `04_triage_and_evaluation` | a scorer, a rule that decides, a strict parser for a model's decision, an error analysis by pattern | the answer key and a majority-label baseline |
|
|
51
51
|
|
|
52
52
|
They use the same stub, check and solution format as the [RAG lab](rag-local.md), and start from working copies of the earlier exercises. Learners
|
|
53
|
-
need the RAG lab's `pip install -e '.[rag-local]'` and `jupyterlab`. Instructor notes: [aml-lab-instructor.md](aml-lab-instructor.md).
|
|
53
|
+
need the RAG lab's `pip install -e '.[rag-local]'` and `jupyterlab ipywidgets`. Instructor notes: [aml-lab-instructor.md](aml-lab-instructor.md).
|
|
54
54
|
`destroy` removes the notebooks unless the learner has edited them: an edited notebook is their work and stays.
|
|
55
55
|
|
|
56
56
|
### Quality checks
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# labagent compute
|
|
2
|
+
|
|
3
|
+
Commands that answer "what can I rent, from whom, for how much, and what do I type into `launch`?". They create and change nothing, except `ssh-key-add`, which adds one public SSH key to your cloud account (free, and you can delete it there). The cloud is always named: there is no default.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
labagent compute clouds # which clouds are wired in, and whether each one's key is set
|
|
7
|
+
labagent compute offers --cloud shadeform --gpu H100 # available now, cheapest first, with the OS images each offer accepts
|
|
8
|
+
labagent compute offers --cloud shadeform --gpu H100 --gpus 8 --all
|
|
9
|
+
labagent compute offers --cloud shadeform --vendor scaleway --max-price 5 --kind vm --limit 10
|
|
10
|
+
labagent compute ssh-keys --cloud shadeform # the ssh_key_id values in that account, with each key's fingerprint
|
|
11
|
+
labagent compute ssh-key-add --cloud all --name labagent # make ~/.labagent/keys/labagent_ed25519 if missing, add its public half to EVERY cloud
|
|
12
|
+
labagent compute offers --cloud lambda --gpu H100 # the same commands work on every cloud: see Lambda below
|
|
13
|
+
labagent compute offers --cloud nebius --gpu H100 # Nebius: see Nebius below (needs NEBIUS_PROJECT_ID)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Every table starts with whose answer it is: `Shadeform . GPU offers . on-demand, available now, 2 offers, cheapest first . fetched 18:20Z`.
|
|
17
|
+
|
|
18
|
+
| Command | Answers |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `compute clouds` | The clouds this install can talk to, what each can do (`offers`, `ssh-keys`, `launch`), and whether its API key is set (never the key) |
|
|
21
|
+
| `compute offers --cloud C` | Shapes you can rent from cloud `C` |
|
|
22
|
+
| `compute ssh-keys --cloud C` | SSH keys already in your account at `C`: id, name, whether it is the account default, and its SHA256 fingerprint. Never the key |
|
|
23
|
+
| `compute ssh-key-add --cloud C --name N [--file PATH]` | Makes an ed25519 key at `PATH` (default `~/.labagent/keys/labagent_ed25519`, the same file for every cloud, no passphrase, mode 0600) if the file does not exist, never overwrites one, and adds only its public half to the account. A key already there is reused. `--cloud all` does it for every cloud whose API key is set (others are skipped, and one failing does not stop the rest; exit 2 if any failed). Launches find the key by fingerprint, so the `ssh_key_id` it prints is optional |
|
|
24
|
+
|
|
25
|
+
`--cloud` is required. `labagent compute clouds` lists the values. A key comes from the cloud's environment variable (Shadeform: `SHADEFORM_API_KEY`, Lambda: `LAMBDA_API_KEY`, RunPod: `RUNPOD_API_KEY`, Nebius: `NEBIUS_IAM_TOKEN`, see Nebius below), then the cloud's section of `~/.labagent/credentials`, then, for Lambda and RunPod, the file `~/.labagent/keys/lambda_api_key` or `runpod_api_key` holding just the key. It is only ever sent to that cloud. A key file other users can read gets a warning: `chmod 600` it.
|
|
26
|
+
|
|
27
|
+
## Nebius
|
|
28
|
+
|
|
29
|
+
`--cloud nebius` is Nebius AI Cloud (REST API at `api.nebius.cloud`). It differs from the other two in ways you will see:
|
|
30
|
+
|
|
31
|
+
- **A project is one region.** Everything is created inside a Nebius project, and a project belongs to one region (`eu-north1`, `us-central1`, ...). Set the project with `NEBIUS_PROJECT_ID` (it looks like `project-e00...`) or put it in `~/.labagent/keys/nebius_project_id`. The offers show that region, and `--region`/`--location` only match it. To rent in another region, point `NEBIUS_PROJECT_ID` at a project there. The VM goes in the project's default subnet with a public address (override with `NEBIUS_SUBNET_ID`). The project's default security group lets all traffic in, so SSH, 80 and 443 reach the VM with nothing to open.
|
|
32
|
+
- **Login: three ways, first found.** (1) A 12 hour token: `NEBIUS_IAM_TOKEN`, `[nebius]` in `~/.labagent/credentials`, or the file `~/.labagent/keys/nebius_iam_token`; make one with `nebius iam get-access-token`. (2) A service account, for a machine that runs unattended: a JSON file `~/.labagent/keys/nebius_service_account.json` (or `NEBIUS_SERVICE_ACCOUNT_FILE`) holding `{"service_account_id": "...", "public_key_id": "...", "private_key_file": "path to the PEM"}`. labagent signs a 5 minute JWT with `openssl` and exchanges it for a token, as [Nebius describes](https://docs.nebius.com/rest-api/authentication). (3) The `nebius` command line tool, if it is installed and set up: labagent runs `nebius iam get-access-token`.
|
|
33
|
+
- **Shapes.** A Nebius shape is a platform and a preset, written `platform/preset`: `gpu-h100-sxm/1gpu-16vcpu-200gb`. `--type H100` is the one-GPU H100 preset and `H100x8` the eight-GPU one, the same words as on the other clouds. Offered: H100, H200 and B200, the families whose price is known (below). The CPU platforms and other GPUs are left out.
|
|
34
|
+
- **Prices are list prices.** The Nebius API has no price list, so the prices are Nebius's public **on-demand** list prices per GPU-hour, copied from [nebius.com/prices](https://nebius.com/prices) on 2026-11-14: H100 $4.50, H200 $5.40, B200 $8.50, times the number of GPUs. They are only used for the price ceiling and the estimate shown first. Nebius's own bill is what counts. VMs are never **preemptible**: a preemptible (spot) VM is cheaper but Nebius can stop it in the middle of a class.
|
|
35
|
+
- **Capacity.** Nebius shows no capacity, only what the project may use, so every offer reads as available. A launch that finds no capacity or quota fails within seconds with Nebius's own message, before anything is billed.
|
|
36
|
+
- **No SSH key list.** There is nothing to add a key to. The key is installed on the VM when it is created (cloud-init), for the user `ubuntu`, from the PUBLIC half of the private file you launch with (`ssh_key_file`, `LABAGENT_SSH_KEY_FILE`, or the shared `~/.labagent/keys/labagent_ed25519`). `ssh_key_id` is ignored, `labagent compute ssh-keys --cloud nebius` says so, and `ssh-key-add --cloud all` skips Nebius with that reason. The shared key still works: make it once with `ssh-key-add --cloud all`.
|
|
37
|
+
- **Image.** The default family is `ubuntu24.04-cuda13.0` (NVIDIA driver and CUDA). `ubuntu24.04-driverless` is the other family in Nebius's docs, and any other family name can be passed as `os`. The boot disk is 300 GiB network SSD, created with the VM and **deleted with it**.
|
|
38
|
+
- **No automatic deletion.** Nebius has no setting that deletes a VM after some hours, so `hours` cannot be enforced by the cloud. A Nebius VM bills until you `destroy` it. A launch that fails still deletes its own VM.
|
|
39
|
+
|
|
40
|
+
## Lambda
|
|
41
|
+
|
|
42
|
+
`--cloud lambda` is Lambda Cloud (formerly Lambda Labs, API at `cloud.lambda.com`). It differs from Shadeform in ways you will see:
|
|
43
|
+
|
|
44
|
+
- **One company, so no vendor.** The `vendor` of every offer is `lambda`, and you pick a `region` such as `us-west-3`. `--location europe | north-america | asia-pacific` works too (from the region code).
|
|
45
|
+
- **Shapes.** `--type` takes Lambda's own name (`gpu_1x_h100_pcie`) or the shape other clouds use: `H100` is the cheapest one-GPU H100, `H100x8` the eight-GPU one. Only x86 GPU shapes are listed: the ARM GH200 is left out because the lab image is for x86. Sold-out shapes (`--all`) show no region, because Lambda lists capacity per shape.
|
|
46
|
+
- **Images.** The default is `lambda-stack-24-04` (Ubuntu with the NVIDIA driver and CUDA). Others: `gpu-base-24-04`, `lambda-stack-22-04`, `gpu-base-22-04`. The login user is `ubuntu`.
|
|
47
|
+
- **SSH keys are chosen by name at launch.** The `ssh_key_id` you pass is looked up in the account, and its name is sent. `ssh-key-add` sends only the public half, so Lambda never generates a pair (and never has a private key to hand back).
|
|
48
|
+
- **No automatic deletion.** Lambda has no setting that deletes an instance after some hours, so `hours` cannot be enforced by the cloud. A Lambda VM bills until you `destroy` it. A launch that fails still deletes its own VM.
|
|
49
|
+
- **Firewall.** A new Lambda account lets in only SSH and ping, and the labs are served on 80 and 443. A launch attaches a firewall ruleset named `labagent-web-<region>` that opens exactly TCP 80 and 443 from anywhere. It is created on first use in that region and reused after. labagent never edits the account-wide rules and never deletes the ruleset (other instances may use it). Remove it in the Lambda console when you are done with it.
|
|
50
|
+
|
|
51
|
+
## Nebius Devlab
|
|
52
|
+
|
|
53
|
+
`--cloud nebius-devlab` is Nebius's container product (Serverless AI Devlabs): the same login, project (so region) and platforms as [Nebius](#nebius), but the offers are `kind=container` with vendor `nebius-devlab`, and a launch creates a Devlab instead of a VM (REST `POST /ai/v1/devlabs`). A Devlab has its own HTTPS address and no ssh, Docker or MIG, so it belongs to [`gpu-notebooks-container`](gpu-notebooks.md#containers-gpu-notebooks-container) (one JupyterLab), never to `gpu-notebooks`.
|
|
54
|
+
|
|
55
|
+
- **Template.** Nebius's own JupyterLab template (`vmapptemplate-g00devlab-jupyter`, PyTorch, persistent `/home`). Its login is a token of exactly 16 letters and digits, which labagent chooses and prints.
|
|
56
|
+
- **GPU.** `gpu: ["H100:1"]`. Nebius lists b200, b300, h100, h200, l40s and rtx6000. The container disk is 100 GiB (the template's minimum is 90) and is deleted with the Devlab.
|
|
57
|
+
- **No automatic deletion, and no price in the API.** A Devlab bills until `destroy`. Prices are the same public GPU-hour list prices as the VMs; the disk is extra.
|
|
58
|
+
- **Checked (2026-11-22):** the OpenAPI routes, the status values, and `dryRun` creates on a real project (nothing created). **Not yet:** a real Devlab running, its address opening, the token accepted.
|
|
59
|
+
|
|
60
|
+
## RunPod
|
|
61
|
+
|
|
62
|
+
`--cloud runpod` is RunPod (API v2 at `api.runpod.io`). **A RunPod machine is a pod: a container, not a VM.** Every offer has `kind=container`. A pod has no Docker daemon of its own and cannot change GPU state (`nvidia-smi -mig 1` answers "Insufficient Permissions"), so the `gpu-notebooks` pack, which needs root, Docker with the NVIDIA runtime and MIG, skips RunPod offers. Use the [`gpu-notebooks-container`](gpu-notebooks.md#containers-gpu-notebooks-container) pack for a pod with RunPod's own JupyterLab, or `labagent compute ...` to look around.
|
|
63
|
+
|
|
64
|
+
- **Two clouds in one.** The `vendor` of an offer is `runpod-secure` or `runpod-community`, the RunPod cloud the price belongs to. The `region` is a data center id such as `US-KS-2` (`--location` works from its prefix). Creating a pod needs a vendor; the region is optional and RunPod picks one.
|
|
65
|
+
- **Shapes.** `--type` takes RunPod's GPU id (`"NVIDIA GeForce RTX 4090"`) or the shape other clouds use: `H100` is one GPU, `H100x8` eight, `RTX4090`. Prices are per GPU per hour from RunPod's catalog, times the count. A count above what the cloud allows per pod is not offered.
|
|
66
|
+
- **SSH keys are put on the pod, not in the account.** A launch passes the public half of your key file as the pod's `PUBLIC_KEY`, which RunPod's official images turn into an authorized key, so the account's key list is not touched. `ssh-keys` lists the account's keys (plain strings, so the id is the fingerprint). `ssh-key-add` is not needed: RunPod's key call replaces the whole list, which labagent will not do for you. The pod is reached by its public IP and mapped port for 22/tcp as `root`.
|
|
67
|
+
- **Ports.** A pod publishes nothing unless asked. The container pack publishes `8888/http` for RunPod's own JupyterLab, and RunPod serves it at `https://<pod id>-8888.proxy.runpod.net`.
|
|
68
|
+
- **No automatic deletion.** Pods have no time limit, so `hours` cannot be enforced by the cloud. A pod bills until it is terminated, and terminating deletes its container disk.
|
|
69
|
+
- **Keys.** Create the API key with the scopes `catalog:read`, `pods:read`, `pods:write`, `authentication:read` and `authentication:write`. "Full access" in the console was seen to lack `catalog:read`; the error then says which scope is missing.
|
|
70
|
+
- **Verified live (2026-11-19):** the SSH key list and pod list responses, the catalog's 403 on a key without `catalog:read`, and the catalog offers. Creating a pod and the proxy URL (it answered on a real pod). **Not yet:** RunPod's own JupyterLab login with a `JUPYTER_PASSWORD` that labagent sets.
|
|
71
|
+
|
|
72
|
+
For `--cloud all` the JSON is `compute.ssh-key-all/1`: `name`, `fingerprint`, `key_file`, `key_file_created`, and `clouds`, one row per cloud with `status` (`ok`, `skipped` or `failed`), `ssh_key_id`, `added_to_cloud` or `error`. `status` is `failed` (with `error` and exit 2) if the key could not be added somewhere.
|
|
73
|
+
|
|
74
|
+
## offers
|
|
75
|
+
|
|
76
|
+
Filters: `--gpu` (family, e.g. H100), `--gpus` (count per machine), `--type` (the cloud's shape name, the `instance_type` parameter), `--vendor` (the datacenter company behind the offer), `--region`, `--location` (`any`, `europe`, `north-america`, `asia-pacific`: the area of the region, from its country code), `--kind` (vm, baremetal, container), `--max-price` (dollars per hour), `--all` (include sold out), `--limit`. Capacity changes within minutes, so look right before you launch. Only on-demand capacity is listed, never spot.
|
|
77
|
+
|
|
78
|
+
Each row gives `vendor`, `region` and `instance_type`, and the `os` values the offer accepts. Use `--kind vm` or `baremetal` for `gpu-notebooks`: a `container` offer has no root, Docker or MIG.
|
|
79
|
+
|
|
80
|
+
## JSON for a console or script
|
|
81
|
+
|
|
82
|
+
Add `--json`. Every document has `schema` (what it is, and its version), `status` (`ok` or `failed`) and, when it failed, `error`. Keys are only ever added, never renamed or removed. With `--json` a failure is a JSON document on stdout with exit code 2, so a caller never parses text. Warnings (for example a credentials file other users can read) are in `warnings` and on stderr.
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{"schema": "compute.offers/1", "status": "ok", "cloud": "shadeform", "cloud_title": "Shadeform", "fetched_at": "2026-11-13T18:20:00Z",
|
|
86
|
+
"count": 1, "returned": 1, "warnings": [], "offers": [
|
|
87
|
+
{"instance_type": "H100", "vendor": "latitude", "region": "dallas-usa-1", "region_name": "US, Dallas, TX", "gpu_type": "H100",
|
|
88
|
+
"num_gpus": 1, "vram_gb": 80, "vcpus": 16, "memory_gb": 192, "storage_gb": 7600, "interconnect": "pcie", "kind": "baremetal", "location": "north-america",
|
|
89
|
+
"hourly_usd": 1.99, "available": true, "boot_seconds": 1020, "max_labs": 7, "os_options": ["ubuntu24.04_cuda12.4_shade_os"],
|
|
90
|
+
"launch": {"cloud": "shadeform", "instance_type": "H100", "vendor": "latitude", "region": "dallas-usa-1"}}]}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{"schema": "compute.ssh-keys/1", "status": "ok", "cloud": "shadeform", "cloud_title": "Shadeform", "fetched_at": "...", "count": 2, "warnings": [],
|
|
95
|
+
"ssh_keys": [{"id": "...", "name": "laptop", "is_default": false, "fingerprint": "SHA256:..."}]}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{"schema": "compute.ssh-key/1", "status": "ok", "cloud": "shadeform", "cloud_title": "Shadeform", "fetched_at": "...", "warnings": [],
|
|
100
|
+
"ssh_key_id": "...", "name": "labagent", "fingerprint": "SHA256:...", "key_file": "/home/me/.labagent/keys/labagent_ed25519",
|
|
101
|
+
"key_file_created": true, "added_to_cloud": true}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{"schema": "compute.clouds/1", "status": "ok", "clouds": [
|
|
106
|
+
{"id": "shadeform", "title": "Shadeform", "capabilities": ["offers", "ssh_keys", "launch"], "warnings": [],
|
|
107
|
+
"credentials": {"configured": true, "source": "environment", "env_var": "SHADEFORM_API_KEY", "file": "~/.labagent/credentials", "section": "shadeform"}}]}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{"schema": "compute.offers/1", "status": "failed", "error": "--cloud is required. Available: shadeform. See them with: labagent compute clouds"}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
`launch` holds the `gpu-notebooks` parameters that select that offer, and `max_labs` is its estimate of MIG slices (an estimate: `null` means unknown). Both are hints for that one pack. Add `os` from `os_options` and your `ssh_key_id`. Key material is never returned.
|
|
115
|
+
|
|
116
|
+
## From Python
|
|
117
|
+
|
|
118
|
+
The commands are a thin printer over a library with no printing and no pack knowledge:
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
from labagent import compute
|
|
122
|
+
|
|
123
|
+
compute.catalog() # the same list as `compute clouds`
|
|
124
|
+
cloud = compute.make("shadeform") # reads the key from the environment or ~/.labagent/credentials
|
|
125
|
+
offers = cloud.offers(compute.OfferQuery(gpu_type="H100", num_gpus=8))
|
|
126
|
+
keys = cloud.ssh_keys() # compute.ComputeError says what went wrong, and never contains a key
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Adding a cloud
|
|
130
|
+
|
|
131
|
+
Subclass `Provider` in `labagent/compute/providers.py`, set `id`, `title`, `capabilities` and `env_var`, implement `offers`, `ssh_keys` and (for `launch`) the host methods, and add it to `PROVIDERS`. `compute clouds` lists it and every command takes it as `--cloud <id>`. Nothing else changes.
|
|
@@ -10,7 +10,7 @@ All fake data: `e2e-student-01..10@example.com`, cohort `e2e-001`, date `01-Jan-
|
|
|
10
10
|
Setup
|
|
11
11
|
```bash
|
|
12
12
|
cd labagent && python3 -m venv .venv && .venv/bin/pip install -e ".[dev]" && source .venv/bin/activate
|
|
13
|
-
cp examples/config.example.
|
|
13
|
+
cp examples/config.example.yaml lab.yaml # set allowed_account_ids to the TEST account id; keep lab.yaml out of git
|
|
14
14
|
export AWS_PROFILE=<admin profile for the test account>
|
|
15
15
|
openssl genrsa -out priv.pem 2048 && openssl rsa -in priv.pem -pubout -out pub.pem
|
|
16
16
|
```
|
|
@@ -18,13 +18,13 @@ openssl genrsa -out priv.pem 2048 && openssl rsa -in priv.pem -pubout -out pub.p
|
|
|
18
18
|
### A0: bootstrap the state backend (once per account)
|
|
19
19
|
|
|
20
20
|
Follow `docs/state-and-secrets.md`: run the state backend module (`cd "$(labagent bootstrap-path)"`) with your own caller ARN in `admin_principal_arns` and
|
|
21
|
-
`runner_principal_arns`, then copy `terraform output backend_config` into `lab.
|
|
22
|
-
Also set `
|
|
21
|
+
`runner_principal_arns`, then copy `terraform output backend_config` into `lab.yaml` under `backend:`.
|
|
22
|
+
Also set `name_prefix: e2e` so the test group, policy and role are `e2e-e2e-001-students` etc. and cannot collide with
|
|
23
23
|
anything real. Terraform >= 1.11 must be installed (`terraform version`).
|
|
24
24
|
|
|
25
25
|
| # | Action | Expected |
|
|
26
26
|
|---|---|---|
|
|
27
|
-
| A1 | `python scripts/make_test_job.py --command provision --mode dry-run --cohort e2e-001 --date 01-Jan-2030 --pubkey pub.pem > job.json`, then `labagent --config lab.
|
|
27
|
+
| A1 | `python scripts/make_test_job.py --command provision --mode dry-run --cohort e2e-001 --date 01-Jan-2030 --pubkey pub.pem > job.json`, then `labagent --config lab.yaml run --job job.json --output result.json` | exit 0, 10 items `planned` (a real `terraform plan`, read-only: no lock, no state write), nothing in IAM |
|
|
28
28
|
| A2 | Same with no `--mode` (apply) | exit 0, 10 `created`, 10 `secrets` with ciphertext only. IAM shows 10 users, the cohort group, policy and Lambda role. S3 shows `cohorts/e2e-001/terraform.tfstate`: download it and confirm it contains **no password** |
|
|
29
29
|
| A3 | Decrypt one: `jq -r '.secrets[0].ciphertext' result.json \| base64 -d > ct.bin; openssl pkeyutl -decrypt -inkey priv.pem -in ct.bin -pkeyopt rsa_padding_mode:oaep -pkeyopt rsa_oaep_md:sha256 -pkeyopt rsa_mgf1_md:sha256` | prints a 20 char password. `grep` the result file for that password: no match |
|
|
30
30
|
| A4 | Re-run A2 | 10 `exists`, **0 secrets** (no password re-issued), exit 0 |
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# gpu-notebooks: one JupyterLab per GPU slice
|
|
2
|
+
|
|
3
|
+
Rent a GPU VM, split each GPU into NVIDIA MIG slices, and give every slice its own Docker container with JupyterLab. One launch prints a URL and a login for every lab. Built for hackathons and workshops on GPU clouds: an H100 gives 7 labs, an 8-GPU box 56.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
# one-time: put your key in ~/.labagent/credentials (chmod 600), or export SHADEFORM_API_KEY
|
|
7
|
+
# [shadeform]
|
|
8
|
+
# <your api key>
|
|
9
|
+
# one-time: make a key just for launches (kept apart from ~/.ssh) and add its public half to your Shadeform account
|
|
10
|
+
labagent compute ssh-key-add --cloud all --name labagent # ONE key for every cloud that has an API key set
|
|
11
|
+
labagent launch gpu-notebooks --name nvidia-h100-hackathon --dry-run
|
|
12
|
+
labagent launch gpu-notebooks --name nvidia-h100-hackathon \
|
|
13
|
+
--param cloud=shadeform --param vendor=scaleway --param region=paris-france-1 \
|
|
14
|
+
--param os=ubuntu24.04_cuda13.0_shade_os
|
|
15
|
+
labagent destroy gpu-notebooks --name nvidia-h100-hackathon
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
On Lambda Cloud instead (key in `LAMBDA_API_KEY`, `~/.labagent/credentials` under `[lambda]`, or `~/.labagent/keys/lambda_api_key`; see [compute.md](compute.md#lambda)): `--param cloud=lambda --param region=us-west-3`, or `--param location=north-america` to take the cheapest. **Lambda never deletes a VM for you:** it bills until `destroy`.
|
|
19
|
+
|
|
20
|
+
On Nebius (a project of yours in one region, `NEBIUS_PROJECT_ID`, and a token, a service account or the `nebius` CLI; see [compute.md](compute.md#nebius)): `--param cloud=nebius` (the region is the project's). **Nebius never deletes a VM for you either**, and there is no SSH key list: the key is installed on the VM at creation from your private key file.
|
|
21
|
+
|
|
22
|
+
The same run from a file ([launch files](launch-files.md)): `labagent launch -f hackathon.yaml`, and `labagent destroy -f hackathon.yaml` to stop it.
|
|
23
|
+
|
|
24
|
+
Leave `vendor` and `region` out and the launch stops with the five cheapest available offers for your `instance_type`. Or set `location` instead (`any`, `europe`, `north-america`, `asia-pacific`) and labagent picks the cheapest available machine of that `instance_type` there, with the newest CUDA image. It keeps that pick in the pack's state, so a rerun never switches machine.
|
|
25
|
+
|
|
26
|
+
## See what is available first
|
|
27
|
+
|
|
28
|
+
`labagent compute offers --cloud shadeform --gpu H100` shows what you can launch right now, cheapest first, and what to type. `labagent compute ssh-keys --cloud shadeform` shows the `ssh_key_id` values. Both are read only. Commands, filters and the JSON for a console are in [compute.md](compute.md).
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
labagent compute offers --cloud shadeform --gpu H100
|
|
32
|
+
labagent compute offers --cloud shadeform --gpu H100 --gpus 8 --all # eight-GPU boxes, including the sold-out ones
|
|
33
|
+
labagent compute ssh-keys --cloud shadeform
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`LABS` is the number of smallest MIG slices (7 per GPU on H100, H200 and A100), so an 8-GPU box shows 56. It is an estimate, and `-` means unknown or no MIG: an RTX 5090 shows `-` because there you choose `labs` yourself (`mode=shared`). Your `mig_profile` must exist on that GPU: `nvidia-smi mig -lgip` on the VM lists them.
|
|
37
|
+
|
|
38
|
+
## The SSH key
|
|
39
|
+
|
|
40
|
+
The launch logs in to the new VM with an SSH key, so the cloud account must hold the public half of a private file you have. **One key serves every cloud**: you keep one private file, and each cloud gets its public half under whatever id it likes.
|
|
41
|
+
|
|
42
|
+
- Make it once: `labagent compute ssh-key-add --cloud all --name labagent`. It makes `~/.labagent/keys/labagent_ed25519` (no passphrase, mode 0600) if it is missing, never overwrites a file, and adds only the public half to every cloud that has an API key set. Run it twice and nothing is added twice. `--cloud shadeform` (or any one cloud) adds it to just that cloud, and `--file PATH` uses another private file (for example an existing key you already registered in one cloud, to add it to the others).
|
|
43
|
+
- Use a key made only for launches, not your everyday `~/.ssh/id_ed25519`.
|
|
44
|
+
- That is all: **there is no `ssh_key_id` to copy**. The launch takes the private file (`ssh_key_file`, else `LABAGENT_SSH_KEY_FILE`, else `~/.labagent/keys/labagent_ed25519` if it exists) and finds the key in the cloud account whose fingerprint matches. If the account has no such key, nothing is rented and the message gives the command that adds it. Without any key the cloud would install its own default one (`Shadeform Managed Key`), whose private half is not on your machine, and the launch could never log in: that caused a real failed launch.
|
|
45
|
+
- To use a different key in one account, set `ssh_key_id` (see `labagent compute ssh-keys --cloud <cloud>`). Then the launch compares the private file with that key, and a mismatch stops it with both fingerprints and nothing rented. Ids differ per cloud, so only use this with one cloud.
|
|
46
|
+
- The result (`summary.outputs`) says which key was used: `ssh_key_id`, `ssh_key_name`, `ssh_key_fingerprint` and `ssh_key_verified` (false when no file was given or the cloud shows no public half, so it could not be checked). The file's path is not in the result.
|
|
47
|
+
- A key with a passphrase cannot be used: nothing can type it during a launch.
|
|
48
|
+
|
|
49
|
+
## What you see
|
|
50
|
+
|
|
51
|
+
In a terminal the run is laid out for people: a banner, numbered steps with a live timer and a tick with the time each one took, warnings in yellow, and at the end one card with the VM, its expiry, the stop command, every lab link, and the shared login. Tables from `labagent offers` and `labagent ssh-keys` are coloured the same way.
|
|
52
|
+
|
|
53
|
+
- On a terminal the result JSON is not printed, because the card says the same. `--json` prints it anyway, and `--output FILE` writes it.
|
|
54
|
+
- Piped, redirected, or in CI, nothing changes: plain text on stderr and the JSON on stdout.
|
|
55
|
+
- `NO_COLOR=1` or `--color never` gives the plain output even on a terminal. `--color always` (or `FORCE_COLOR=1`) forces colour, for example to record a demo through a pipe.
|
|
56
|
+
|
|
57
|
+
## What it does
|
|
58
|
+
|
|
59
|
+
1. **preflight**: checks the offer and prints the hourly price. Creates nothing.
|
|
60
|
+
2. **host**: creates the VM and waits until it is active. Shadeform deletes it after `hours` whatever happens to this tool. Lambda and Nebius have no such setting: there the VM bills until `destroy`, and the preflight, the report and `summary.outputs.auto_delete` (`false`) all say so.
|
|
61
|
+
3. **setup**: logs in over ssh, installs the lab installer (`/opt/labagent/start-labs.sh`), enables MIG, creates the slices.
|
|
62
|
+
4. **access**: sets the host name and creates the shared login user (below).
|
|
63
|
+
5. **labs**: one container per slice (`NVIDIA_VISIBLE_DEVICES=MIG-<uuid>`), each with its own random token, CPU and memory limits, and JupyterLab under `/lab-NN`. Caddy serves them on `https://<ip>.sslip.io` with a real certificate. A systemd unit rebuilds the slices and containers at boot.
|
|
64
|
+
6. **verify**: every lab must answer, refuse requests without its token, accept its own token, and see exactly one GPU slice. Then the pack checks from your machine that the public URLs open.
|
|
65
|
+
7. **report**: prints every URL with its login, and writes `~/.labagent/packs/gpu-notebooks/<name>-credentials.csv` (0600).
|
|
66
|
+
|
|
67
|
+
## Params
|
|
68
|
+
|
|
69
|
+
| Param | Meaning |
|
|
70
|
+
|---|---|
|
|
71
|
+
| `cloud` | Whose API to call: `shadeform` (default), `lambda` or `nebius` |
|
|
72
|
+
| `instance_type` | The cloud's shape: `H100` is one GPU, `H100x8` is eight |
|
|
73
|
+
| `location` | `any`, `europe`, `north-america` or `asia-pacific`. Used only when `vendor` and `region` are empty: picks the cheapest available machine of `instance_type` in that area (never a container) and the newest CUDA `os`. Fails with a plain message when nothing is available there |
|
|
74
|
+
| `max_price` | Dollars per hour, default 0 (no limit). Used with `location`: dearer offers are ignored, and the launch fails plainly if none is left |
|
|
75
|
+
| `show_passwords` | `yes` (default) or `no`. `no` keeps every lab token and the shell password out of the printed report and the card. They stay in the credentials file, and a job with a public key gets the tokens back sealed. The console always sets `no` |
|
|
76
|
+
| `vendor`, `region`, `os`, `ssh_key_id` | `vendor` is Shadeform only: the datacenter company behind the offer (`scaleway`, `massedcompute`). `region` is that vendor's region on Shadeform, e.g. `us-west-3` on Lambda, and on Nebius the region of the project (e.g. `eu-north1`). `os` must be one the offer lists (on Lambda an image family such as `lambda-stack-24-04`, the default). `ssh_key_id` is optional, see [The SSH key](#the-ssh-key); Nebius has no key list, so it is ignored there |
|
|
77
|
+
| `ssh_key_file` | The private key to log in with. Default: the `LABAGENT_SSH_KEY_FILE` environment variable, then `~/.labagent/keys/labagent_ed25519` if it exists. Its public half must be in the cloud account (found by fingerprint, or checked against `ssh_key_id` when you set that) before anything is rented. A remote job cannot set it |
|
|
78
|
+
| `keep_on_failure` | `no` (default) or `yes`. A launch that fails deletes the VM it rented (see [Cost and safety](#cost-and-safety)). `yes` leaves it running so you can look inside; you pay until `destroy` or `hours`. A remote job cannot set it |
|
|
79
|
+
| `hours` | Shadeform deletes the VM after this long (1 to 72, default 4). Lambda and Nebius cannot: there it only sets the planned end shown in the report, and you must run `destroy` |
|
|
80
|
+
| `mode` | `mig` (default): one hardware-isolated MIG slice per lab, on H100, H200 and A100. `shared`: labs share the whole GPU with no isolation, for GPUs without MIG such as the RTX 5090. See [GPUs](#gpus) |
|
|
81
|
+
| `mig_profile` | `mig` only. Slice size. `auto` (default) is the smallest the GPU offers: `1g.10gb` on H100 and A100 80GB, `1g.5gb` on A100 40GB. Others: `1g.20gb` (4 per 80GB GPU), `2g.20gb` (3), `3g.40gb` (2) |
|
|
82
|
+
| `labs` | How many labs to start. `mig`: 0 = one per slice. `shared`: required. At most 99 |
|
|
83
|
+
| `image` | Docker image per lab (default `quay.io/jupyter/pytorch-notebook:cuda12-latest`) |
|
|
84
|
+
| `tls` | `letsencrypt` (default), `internal` (self-signed) or `none` (plain http: tokens travel in clear) |
|
|
85
|
+
| `domain` | Name the labs are served on (default `<ip>.sslip.io`) |
|
|
86
|
+
| `hostname` | Host name of the VM, shown in every shell prompt. Default: the launch `--name`, so name launches after the event |
|
|
87
|
+
| `login_user` | Shared shell user (default `labagent`, empty = none) |
|
|
88
|
+
| `login_sudo` | Give that user sudo and docker (default true) |
|
|
89
|
+
|
|
90
|
+
## Containers: gpu-notebooks-container
|
|
91
|
+
|
|
92
|
+
`gpu-notebooks` needs a VM with root, Docker and (for isolation) MIG. A RunPod pod is a container: no Docker daemon, no MIG, and a second JupyterLab installed inside it is fragile. `gpu-notebooks-container` installs nothing. It creates the pod with **RunPod's own JupyterLab** switched on and a password it chose, then reports the URL RunPod gives that Jupyter and the password. One pod, one JupyterLab, the whole GPU. Same launch and destroy, same key handling, and a failed launch still deletes the pod it rented.
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
labagent compute offers --cloud runpod --gpu H100
|
|
96
|
+
labagent launch gpu-notebooks-container --name demo --param cloud=runpod \
|
|
97
|
+
--param 'instance_type=NVIDIA H100 NVL' --param vendor=runpod-secure --param region=US-KS-2 \
|
|
98
|
+
--param ssh_key_file=$HOME/.labagent/keys/shadeform_ed25519
|
|
99
|
+
labagent destroy gpu-notebooks-container --name demo --param cloud=runpod
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
- **As a file:** [`examples/launch.runpod.example.yaml`](../examples/launch.runpod.example.yaml) holds this launch (`labagent launch -f ...`, and `destroy -f` with the same file).
|
|
103
|
+
- **The URL** is RunPod's proxy: `https://<pod id>-8888.proxy.runpod.net` (seen to answer on a real pod, 2026-11-19). The password is `JUPYTER_PASSWORD`, passed when the pod is created and shown once in the report; it is also in a private file (`~/.labagent/packs/gpu-notebooks-container/<name>-credentials.csv`). If RunPod's Jupyter asks for a token instead of a password, use the same value.
|
|
104
|
+
- **One JupyterLab, always.** A container (a pod, a Devlab) gets exactly one JupyterLab on the whole GPU. **Many labs per machine (MIG slices, one container each) exist only on VMs and bare metal**, through `gpu-notebooks`, which refuses container offers.
|
|
105
|
+
- **Only clouds that start their own JupyterLab** are accepted (`Provider.builtin_jupyter`): RunPod and Nebius Devlabs. For VMs (Lambda, Nebius, Shadeform) use `gpu-notebooks`.
|
|
106
|
+
- **Nebius Devlab:** `--param cloud=nebius` (or `nebius-devlab`) means Nebius's container product, with Nebius's own JupyterLab template. A Devlab needs no ssh key: JupyterLab has a terminal. When a key file is available (`ssh_key_file`, `LABAGENT_SSH_KEY_FILE` or the shared `~/.labagent/keys/labagent_ed25519`), its public half is sent as `sshAuthorizedKeys` with `publicIp: true` and the report prints an ssh line. The request is accepted by Nebius (checked with a dry run); that ssh connects, and as which user, is not verified. `os` is refused (the template is Nebius's), and the token is 16 letters and digits.
|
|
107
|
+
```
|
|
108
|
+
labagent compute offers --cloud nebius-devlab --gpu H100
|
|
109
|
+
labagent launch gpu-notebooks-container --name dl1 --param cloud=nebius --param instance_type=H100
|
|
110
|
+
labagent destroy gpu-notebooks-container --name dl1 --param cloud=nebius
|
|
111
|
+
```
|
|
112
|
+
- **Parameters:** `cloud` (default `runpod`), `instance_type`, `vendor`, `region`, `location`, `max_price`, `os` (a Docker image; default `runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404`, RunPod's official image), `ssh_key_id`, `ssh_key_file`, `keep_on_failure`, `hours`, `show_passwords`.
|
|
113
|
+
- **Use a different `--name` than any `gpu-notebooks` launch.** Both packs name the machine and its credentials file from `--name`, so the same name in both would make one adopt or overwrite the other's.
|
|
114
|
+
- **A pod bills until you destroy it.** RunPod has no auto-delete, and `hours` only sets the planned end shown in the report.
|
|
115
|
+
- **Nebius Devlab: not yet proven on a real Devlab** (as of 2026-11-22). Checked: Nebius's API description, the supported GPU models, the 90 GiB disk minimum and the token rule (all by `dryRun` create calls on a real project, nothing created). Open: that the Devlab reaches RUNNING, that its address opens without a Nebius sign-in (Nebius says its tunnel authorizes access with IAM), and that JupyterLab takes the token.
|
|
116
|
+
- **Not yet proven** (as of 2026-11-19): that a pod created this way has Jupyter running and accepts the password. The docs do not say whether the login is a password or a token.
|
|
117
|
+
|
|
118
|
+
## GPUs
|
|
119
|
+
|
|
120
|
+
| GPU | `mode` | Labs | Notes |
|
|
121
|
+
|---|---|---|---|
|
|
122
|
+
| H100 80GB | `mig` | 7 per GPU, 9.75 GiB each | Verified on one PCIe card. |
|
|
123
|
+
| A100 80GB | `mig` | 7 per GPU, same slices as H100 | Not verified on real hardware yet. |
|
|
124
|
+
| A100 40GB | `mig` | 7 per GPU, 4.75 GiB each (`1g.5gb`) | Not verified on real hardware yet. `mig_profile: auto` picks the size: the H100 default `1g.10gb` does not exist on a 40GB card. |
|
|
125
|
+
| RTX 5090, RTX 4090 | `shared` | Your choice, `labs=N` | No MIG, so no isolation. Not verified on real hardware yet. |
|
|
126
|
+
|
|
127
|
+
Find what is available and what it costs with `labagent compute offers --cloud shadeform --gpu A100` (families: `A100` is the 40GB card, `A100_80G` the 80GB one).
|
|
128
|
+
|
|
129
|
+
**A100: a reboot may happen.** On an A100, turning MIG on can need a GPU reset, which a VM often cannot do. The pack tries the reset, and if MIG is still not active it reboots the VM once, waits for it (up to 10 minutes), and carries on. You will see `rebooting the VM once` in the output. A second request for a reboot is a failure: destroy the VM and try another offer.
|
|
130
|
+
|
|
131
|
+
**RTX 5090 and other GPUs without MIG.** A 5090 has 32 GB and no MIG. `mode=mig` is refused before anything is rented. `mode=shared` starts `labs` containers that each see the whole GPU, taken in turn when there are several GPUs. There is **no isolation**: no memory limit and no fair share, so one learner who loads a large model can make everyone else's notebook fail with an out-of-memory error. Keep `labs` small (4 labs is about 8 GB each if everyone behaves) and tell learners to size their work, for example `torch.cuda.set_per_process_memory_fraction(0.25)`. Use `mig` when learners must not affect each other.
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
labagent launch gpu-notebooks --name rtx-workshop --param instance_type=RTX5090 --param vendor=<vendor> --param region=<region> \
|
|
135
|
+
--param os=<os from labagent compute offers> --param mode=shared --param labs=4
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## The shared login
|
|
139
|
+
|
|
140
|
+
The user gets a random 20 character password (in `<name>-ssh-login.csv`, 0600, and in the final report), ssh password login for that one user only (every other user stays key-only), your ssh key too, and a prompt that shows `user@host`. A user someone created by hand is repaired: shell, home directory, prompt.
|
|
141
|
+
|
|
142
|
+
**With sudo this is root.** Anyone with the password can read every lab's token, stop other labs and change the MIG slices, which defeats the one-container-per-slice isolation. For students, give out the lab URLs and set `login_sudo=false`, or keep the shell login for instructors.
|
|
143
|
+
|
|
144
|
+
## Cost and safety
|
|
145
|
+
|
|
146
|
+
`launch` starts a billed VM and prints the hourly price first. **If a launch fails after the VM exists** (it never becomes active, ssh cannot log in, MIG or a lab fails, or you press Ctrl-C), labagent deletes that VM before it returns, and says so in `summary.cleanup`: `{"action": "deleted", "host_id": "..."}`. If the delete itself fails it says `"action": "failed"` and how to delete the VM by hand, and keeps the state file so `destroy` still works. Two cases are left running on purpose: `keep_on_failure=yes`, and a lab that was already working before a failed rerun (`"action": "kept"`). A killed process (SIGKILL, power loss) cannot clean up: on Shadeform the cloud still deletes the VM after `hours`, on Lambda and Nebius nothing does, so check their console after a crash. `destroy` deletes only the VM this launch created: the id in the state file, or after a crash a VM with exactly this name and tag, never by prefix. Tokens go to the VM on ssh stdin, never on a command line, and are not in state or the result JSON.
|
|
147
|
+
|
|
148
|
+
## Verified on a real VM (2026-11-13)
|
|
149
|
+
|
|
150
|
+
One H100 PCIe on Scaleway through Shadeform (`ubuntu24.04_cuda13.0_shade_os`, driver 580, Docker and the NVIDIA container toolkit preinstalled): launch, 7 slices, 7 JupyterLab containers behind a Let's Encrypt certificate, token enforcement, password login for the shared user, the prompt, and destroy. Seven PyTorch containers on seven slices ran at once with no slowdown from each other.
|
|
151
|
+
|
|
152
|
+
**Nebius: one real launch, 2026-11-14.** One H100 (`gpu-h100-sxm/1gpu-16vcpu-200gb`, `ubuntu24.04-cuda13.0`) in a project in `eu-north1`, logged in through the `nebius` command line tool: the create call was accepted as written, the VM was ready for the installer, MIG made 7 slices of `1g.10gb`, 7 JupyterLab containers came up behind a Let's Encrypt certificate, every lab answered, needed its token and saw one slice, and from outside the HTTPS front door answered (a redirect, 302, for a request with no token). The whole launch took about 5 minutes. `destroy` deleted the VM and its boot disk (the project listed no instance and no disk a minute later). Still open: the other two login ways (token, service account) were not run against the real API; the list prices in [compute.md](compute.md#nebius) were not compared with a real Nebius bill; quota or capacity errors, a failed launch's cleanup and other regions were not exercised; the API gave no GPU memory, so the card's known memory is used (H100 80, H200 141, B200 unknown). Besides that, everything listed for Lambda below that is not specific to Lambda (reboot, A100, shared mode) is open here too.
|
|
153
|
+
|
|
154
|
+
**Lambda Cloud is not verified on a real VM.** Its API calls were checked against Lambda's published API description and read-only calls to a real account (offers, SSH keys, instances, firewall rules), and the provider and the pack on top of it are tested against a stand-in for the API. Nobody has yet launched a real Lambda VM with this pack, so these are open: that Docker and its NVIDIA runtime are on the Lambda Stack image (the installer stops with a plain message if not, and the failed launch deletes the VM), that MIG can be enabled inside a Lambda VM, and that the 80 and 443 firewall ruleset lets Let's Encrypt and the labs through.
|
|
155
|
+
|
|
156
|
+
**Not verified yet:** A100 (both sizes), the RTX 5090 shared mode and the A100 reboot path (they are tested against a stand-in for the GPU driver, not real cards), a reboot of the VM (NVIDIA says Hopper does not keep MIG, so the boot unit rebuilds it; that unit has not been rebooted), the 8-GPU SXM shape, and many learners using the labs at once. Shadeform capacity changes within minutes: an offer that passed the preflight can be gone a moment later, and nothing is created when it is.
|
|
157
|
+
|
|
158
|
+
**MIG limit.** An H100 splits into at most 7 slices, so an 8-GPU box gives 56 labs, not 64.
|
|
159
|
+
|
|
160
|
+
**Adding a cloud.** Subclass `Provider` in `labagent/compute/providers.py` (offers, ssh_keys, validate, find, create, get, delete) and add it to `PROVIDERS`: its key becomes a value of `--param cloud`.
|