labagent 0.4.1__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.
Files changed (278) hide show
  1. {labagent-0.4.1/labagent.egg-info → labagent-0.4.2}/PKG-INFO +1 -1
  2. {labagent-0.4.1 → labagent-0.4.2}/docs/compute.md +22 -1
  3. {labagent-0.4.1 → labagent-0.4.2}/docs/gpu-notebooks.md +28 -0
  4. labagent-0.4.2/examples/launch.lambda.example.yaml +22 -0
  5. labagent-0.4.2/examples/launch.nebius.example.yaml +20 -0
  6. labagent-0.4.2/examples/launch.runpod.example.yaml +21 -0
  7. labagent-0.4.2/examples/launch.shadeform.example.yaml +20 -0
  8. {labagent-0.4.1 → labagent-0.4.2}/labagent/__init__.py +1 -1
  9. {labagent-0.4.1 → labagent-0.4.2}/labagent/cli.py +104 -6
  10. {labagent-0.4.1 → labagent-0.4.2}/labagent/compute/cli.py +50 -9
  11. {labagent-0.4.1 → labagent-0.4.2}/labagent/compute/nebius.py +6 -3
  12. labagent-0.4.2/labagent/compute/nebius_devlab.py +169 -0
  13. {labagent-0.4.1 → labagent-0.4.2}/labagent/compute/providers.py +16 -1
  14. labagent-0.4.2/labagent/compute/runpod.py +314 -0
  15. labagent-0.4.2/labagent/instances.py +133 -0
  16. labagent-0.4.2/labagent/packs/gpu_notebooks/container.py +186 -0
  17. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/gpu_notebooks/pack.py +20 -15
  18. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/registry.py +2 -1
  19. {labagent-0.4.1 → labagent-0.4.2/labagent.egg-info}/PKG-INFO +1 -1
  20. {labagent-0.4.1 → labagent-0.4.2}/labagent.egg-info/SOURCES.txt +12 -0
  21. labagent-0.4.2/tests/test_cli_instances.py +170 -0
  22. {labagent-0.4.1 → labagent-0.4.2}/tests/test_compute.py +1 -2
  23. {labagent-0.4.1 → labagent-0.4.2}/tests/test_data_files.py +21 -0
  24. labagent-0.4.2/tests/test_gpu_container.py +142 -0
  25. {labagent-0.4.1 → labagent-0.4.2}/tests/test_gpu_lambda.py +1 -1
  26. {labagent-0.4.1 → labagent-0.4.2}/tests/test_gpu_offers.py +8 -1
  27. {labagent-0.4.1 → labagent-0.4.2}/tests/test_gpu_shared_key.py +1 -1
  28. labagent-0.4.2/tests/test_nebius_devlab.py +245 -0
  29. {labagent-0.4.1 → labagent-0.4.2}/tests/test_nl.py +2 -2
  30. {labagent-0.4.1 → labagent-0.4.2}/tests/test_packs.py +2 -2
  31. labagent-0.4.2/tests/test_runpod.py +335 -0
  32. {labagent-0.4.1 → labagent-0.4.2}/CONTRIBUTING.md +0 -0
  33. {labagent-0.4.1 → labagent-0.4.2}/LICENSE +0 -0
  34. {labagent-0.4.1 → labagent-0.4.2}/MANIFEST.in +0 -0
  35. {labagent-0.4.1 → labagent-0.4.2}/README.md +0 -0
  36. {labagent-0.4.1 → labagent-0.4.2}/SECURITY.md +0 -0
  37. {labagent-0.4.1 → labagent-0.4.2}/docs/account-cleanup.md +0 -0
  38. {labagent-0.4.1 → labagent-0.4.2}/docs/aml-lab-instructor.md +0 -0
  39. {labagent-0.4.1 → labagent-0.4.2}/docs/aml.md +0 -0
  40. {labagent-0.4.1 → labagent-0.4.2}/docs/azure-labs.md +0 -0
  41. {labagent-0.4.1 → labagent-0.4.2}/docs/dbx-lakehouse.md +0 -0
  42. {labagent-0.4.1 → labagent-0.4.2}/docs/dbx-workspace.md +0 -0
  43. {labagent-0.4.1 → labagent-0.4.2}/docs/e2e-test-plan.md +0 -0
  44. {labagent-0.4.1 → labagent-0.4.2}/docs/examples/oidc-trust-policy.example.json +0 -0
  45. {labagent-0.4.1 → labagent-0.4.2}/docs/examples/permissions-read.example.json +0 -0
  46. {labagent-0.4.1 → labagent-0.4.2}/docs/examples/permissions-write.example.json +0 -0
  47. {labagent-0.4.1 → labagent-0.4.2}/docs/examples/runner-workflow.example.yml +0 -0
  48. {labagent-0.4.1 → labagent-0.4.2}/docs/job-contract.md +0 -0
  49. {labagent-0.4.1 → labagent-0.4.2}/docs/launch-files.md +0 -0
  50. {labagent-0.4.1 → labagent-0.4.2}/docs/packs.md +0 -0
  51. {labagent-0.4.1 → labagent-0.4.2}/docs/rag-lab-instructor.md +0 -0
  52. {labagent-0.4.1 → labagent-0.4.2}/docs/rag-local.md +0 -0
  53. {labagent-0.4.1 → labagent-0.4.2}/docs/redis-migrate.md +0 -0
  54. {labagent-0.4.1 → labagent-0.4.2}/docs/state-and-secrets.md +0 -0
  55. {labagent-0.4.1 → labagent-0.4.2}/examples/config.example.yaml +0 -0
  56. {labagent-0.4.1 → labagent-0.4.2}/examples/rulesets/legacy-cleanup.example.yaml +0 -0
  57. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/__init__.py +0 -0
  58. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/__init__.py +0 -0
  59. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/adapters.py +0 -0
  60. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/cli.py +0 -0
  61. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/client.py +0 -0
  62. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/config.py +0 -0
  63. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/embeddings.py +0 -0
  64. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/lab/01_chunking.py +0 -0
  65. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/lab/02_embeddings.py +0 -0
  66. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/lab/03_vector_store.py +0 -0
  67. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/lab/04_generation.py +0 -0
  68. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/lab/05_chroma_and_filters.py +0 -0
  69. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/lab/06_hybrid_search.py +0 -0
  70. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/lab/07_evaluation.py +0 -0
  71. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/lab/08_break_it.py +0 -0
  72. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/lab/__init__.py +0 -0
  73. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/lab/docs/ai_usage_guidelines.md +0 -0
  74. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/lab/docs/backup_and_recovery.md +0 -0
  75. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/lab/docs/expense_policy.md +0 -0
  76. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/lab/docs/remote_work_policy.md +0 -0
  77. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/lab/docs/vendor_risk_management.md +0 -0
  78. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/labkit.py +0 -0
  79. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/llm.py +0 -0
  80. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/models.py +0 -0
  81. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/playground.py +0 -0
  82. {labagent-0.4.1 → labagent-0.4.2}/labagent/ai/rag/samples.py +0 -0
  83. {labagent-0.4.1 → labagent-0.4.2}/labagent/audit.py +0 -0
  84. {labagent-0.4.1 → labagent-0.4.2}/labagent/cleanup.py +0 -0
  85. {labagent-0.4.1 → labagent-0.4.2}/labagent/compute/__init__.py +0 -0
  86. {labagent-0.4.1 → labagent-0.4.2}/labagent/compute/errors.py +0 -0
  87. {labagent-0.4.1 → labagent-0.4.2}/labagent/compute/keys.py +0 -0
  88. {labagent-0.4.1 → labagent-0.4.2}/labagent/compute/lambda_cloud.py +0 -0
  89. {labagent-0.4.1 → labagent-0.4.2}/labagent/config.py +0 -0
  90. {labagent-0.4.1 → labagent-0.4.2}/labagent/console.py +0 -0
  91. {labagent-0.4.1 → labagent-0.4.2}/labagent/context.py +0 -0
  92. {labagent-0.4.1 → labagent-0.4.2}/labagent/datasets.py +0 -0
  93. {labagent-0.4.1 → labagent-0.4.2}/labagent/deleters.py +0 -0
  94. {labagent-0.4.1 → labagent-0.4.2}/labagent/discovery.py +0 -0
  95. {labagent-0.4.1 → labagent-0.4.2}/labagent/envelope.py +0 -0
  96. {labagent-0.4.1 → labagent-0.4.2}/labagent/iam_ops.py +0 -0
  97. {labagent-0.4.1 → labagent-0.4.2}/labagent/nl.py +0 -0
  98. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/__init__.py +0 -0
  99. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/__init__.py +0 -0
  100. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/copilot/__init__.py +0 -0
  101. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/copilot/exercises.py +0 -0
  102. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/copilot/guidance.py +0 -0
  103. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/copilot/office.py +0 -0
  104. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/copilot/package.py +0 -0
  105. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/copilot/select.py +0 -0
  106. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/corpus/__init__.py +0 -0
  107. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/corpus/build.py +0 -0
  108. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/corpus/documents.py +0 -0
  109. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/corpus/regs.py +0 -0
  110. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/data/reg_index.json +0 -0
  111. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/data/sdn_seed.json +0 -0
  112. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/export.py +0 -0
  113. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/gen/__init__.py +0 -0
  114. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/gen/__main__.py +0 -0
  115. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/gen/builtin.py +0 -0
  116. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/gen/snapshot.py +0 -0
  117. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/lab/01_policy_search.py +0 -0
  118. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/lab/02_evidence_bundle.py +0 -0
  119. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/lab/03_citations_and_narrative.py +0 -0
  120. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/lab/04_triage_and_evaluation.py +0 -0
  121. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/lab/__init__.py +0 -0
  122. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/licences.py +0 -0
  123. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/names.py +0 -0
  124. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/pack.py +0 -0
  125. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/rag/__init__.py +0 -0
  126. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/rag/aggregate.py +0 -0
  127. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/rag/bundle.py +0 -0
  128. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/rag/qa.py +0 -0
  129. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/rag/quality.py +0 -0
  130. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/rag/tools.py +0 -0
  131. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/aml/schema.py +0 -0
  132. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/azure_labs/__init__.py +0 -0
  133. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/azure_labs/azcli.py +0 -0
  134. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/azure_labs/lifecycle.py +0 -0
  135. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/azure_labs/migrate.py +0 -0
  136. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/azure_labs/pack.py +0 -0
  137. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/azure_labs/safety.py +0 -0
  138. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/base.py +0 -0
  139. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/databricks/__init__.py +0 -0
  140. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/databricks/auth.py +0 -0
  141. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/databricks/cli.py +0 -0
  142. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/databricks/models.py +0 -0
  143. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/databricks/pg.py +0 -0
  144. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/db_agent/__init__.py +0 -0
  145. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/db_agent/pack.py +0 -0
  146. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/__init__.py +0 -0
  147. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/domains.py +0 -0
  148. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/guides/START_HERE.md +0 -0
  149. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/guides/healthcare.md +0 -0
  150. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/guides/retail.md +0 -0
  151. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/notebook.py +0 -0
  152. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/pack.py +0 -0
  153. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/sql/healthcare/01_bronze.sql +0 -0
  154. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/sql/healthcare/02_silver.sql +0 -0
  155. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/sql/healthcare/03_gold.sql +0 -0
  156. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/sql/healthcare/04_governance.sql +0 -0
  157. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/sql/retail/01_bronze.sql +0 -0
  158. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/sql/retail/02_silver.sql +0 -0
  159. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/sql/retail/03_gold.sql +0 -0
  160. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_lakehouse/sqlrun.py +0 -0
  161. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_workspace/__init__.py +0 -0
  162. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_workspace/guards.py +0 -0
  163. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_workspace/pack.py +0 -0
  164. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/dbx_workspace/tf.py +0 -0
  165. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/gitsrc.py +0 -0
  166. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/gpu_notebooks/__init__.py +0 -0
  167. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/gpu_notebooks/remote.py +0 -0
  168. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/gpu_notebooks/setup.sh +0 -0
  169. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/__init__.py +0 -0
  170. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/app/app.py +0 -0
  171. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/app/app.yaml +0 -0
  172. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/app/requirements.txt +0 -0
  173. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/app/retrieval.py +0 -0
  174. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/app/static/index.html +0 -0
  175. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/chunking.py +0 -0
  176. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/sources/__init__.py +0 -0
  177. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/sources/datasets.json +0 -0
  178. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/sources/sec.py +0 -0
  179. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/tutorial/__init__.py +0 -0
  180. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/00_setup.py +0 -0
  181. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/01_data.py +0 -0
  182. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/02_embeddings.py +0 -0
  183. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/03_pgvector.py +0 -0
  184. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/04_search.py +0 -0
  185. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/05_answer_and_eval.py +0 -0
  186. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/06_deploy_app.py +0 -0
  187. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/99_cleanup.py +0 -0
  188. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/tutorial/notebooks/_common.py +0 -0
  189. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag/tutorial_pack.py +0 -0
  190. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag_ide/__init__.py +0 -0
  191. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag_ide/ec2.py +0 -0
  192. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag_ide/local.py +0 -0
  193. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag_ide/modal_gateway.py +0 -0
  194. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/rag_ide/pack.py +0 -0
  195. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/redis_migrate/__init__.py +0 -0
  196. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/redis_migrate/facts.py +0 -0
  197. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/redis_migrate/pack.py +0 -0
  198. {labagent-0.4.1 → labagent-0.4.2}/labagent/packs/redis_migrate/rules.py +0 -0
  199. {labagent-0.4.1 → labagent-0.4.2}/labagent/plan.py +0 -0
  200. {labagent-0.4.1 → labagent-0.4.2}/labagent/rules.py +0 -0
  201. {labagent-0.4.1 → labagent-0.4.2}/labagent/run.py +0 -0
  202. {labagent-0.4.1 → labagent-0.4.2}/labagent/secrets_box.py +0 -0
  203. {labagent-0.4.1 → labagent-0.4.2}/labagent/spec.py +0 -0
  204. {labagent-0.4.1 → labagent-0.4.2}/labagent/sweep.py +0 -0
  205. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/cohort_iam/.terraform.lock.hcl +0 -0
  206. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/cohort_iam/main.tf +0 -0
  207. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/cohort_iam/outputs.tf +0 -0
  208. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/cohort_iam/sandbox-policy.json.tftpl +0 -0
  209. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/cohort_iam/tests/cohort.tftest.hcl +0 -0
  210. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/cohort_iam/variables.tf +0 -0
  211. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/cohort_iam/versions.tf +0 -0
  212. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/databricks_aws/.terraform.lock.hcl +0 -0
  213. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/databricks_aws/main.tf +0 -0
  214. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/databricks_aws/outputs.tf +0 -0
  215. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/databricks_aws/tests/workspace.tftest.hcl +0 -0
  216. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/databricks_aws/variables.tf +0 -0
  217. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/databricks_aws/versions.tf +0 -0
  218. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/databricks_azure/.terraform.lock.hcl +0 -0
  219. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/databricks_azure/main.tf +0 -0
  220. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/databricks_azure/outputs.tf +0 -0
  221. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/databricks_azure/tests/workspace.tftest.hcl +0 -0
  222. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/databricks_azure/variables.tf +0 -0
  223. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/databricks_azure/versions.tf +0 -0
  224. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/state_backend/.terraform.lock.hcl +0 -0
  225. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/state_backend/main.tf +0 -0
  226. {labagent-0.4.1 → labagent-0.4.2}/labagent/terraform/state_backend/tests/bootstrap.tftest.hcl +0 -0
  227. {labagent-0.4.1 → labagent-0.4.2}/labagent/tf.py +0 -0
  228. {labagent-0.4.1 → labagent-0.4.2}/labagent.egg-info/dependency_links.txt +0 -0
  229. {labagent-0.4.1 → labagent-0.4.2}/labagent.egg-info/entry_points.txt +0 -0
  230. {labagent-0.4.1 → labagent-0.4.2}/labagent.egg-info/requires.txt +0 -0
  231. {labagent-0.4.1 → labagent-0.4.2}/labagent.egg-info/top_level.txt +0 -0
  232. {labagent-0.4.1 → labagent-0.4.2}/pyproject.toml +0 -0
  233. {labagent-0.4.1 → labagent-0.4.2}/scripts/build_lakehouse_data.py +0 -0
  234. {labagent-0.4.1 → labagent-0.4.2}/scripts/check_no_pii.py +0 -0
  235. {labagent-0.4.1 → labagent-0.4.2}/scripts/make_test_job.py +0 -0
  236. {labagent-0.4.1 → labagent-0.4.2}/setup.cfg +0 -0
  237. {labagent-0.4.1 → labagent-0.4.2}/tests/__init__.py +0 -0
  238. {labagent-0.4.1 → labagent-0.4.2}/tests/conftest.py +0 -0
  239. {labagent-0.4.1 → labagent-0.4.2}/tests/test_aml_copilot.py +0 -0
  240. {labagent-0.4.1 → labagent-0.4.2}/tests/test_aml_corpus.py +0 -0
  241. {labagent-0.4.1 → labagent-0.4.2}/tests/test_aml_docs.py +0 -0
  242. {labagent-0.4.1 → labagent-0.4.2}/tests/test_aml_generator.py +0 -0
  243. {labagent-0.4.1 → labagent-0.4.2}/tests/test_aml_lab.py +0 -0
  244. {labagent-0.4.1 → labagent-0.4.2}/tests/test_aml_nl.py +0 -0
  245. {labagent-0.4.1 → labagent-0.4.2}/tests/test_aml_rag.py +0 -0
  246. {labagent-0.4.1 → labagent-0.4.2}/tests/test_azure_labs.py +0 -0
  247. {labagent-0.4.1 → labagent-0.4.2}/tests/test_classify.py +0 -0
  248. {labagent-0.4.1 → labagent-0.4.2}/tests/test_cleanup.py +0 -0
  249. {labagent-0.4.1 → labagent-0.4.2}/tests/test_cloudfront_and_cli.py +0 -0
  250. {labagent-0.4.1 → labagent-0.4.2}/tests/test_console.py +0 -0
  251. {labagent-0.4.1 → labagent-0.4.2}/tests/test_datasets.py +0 -0
  252. {labagent-0.4.1 → labagent-0.4.2}/tests/test_db_agent.py +0 -0
  253. {labagent-0.4.1 → labagent-0.4.2}/tests/test_dbx_lakehouse.py +0 -0
  254. {labagent-0.4.1 → labagent-0.4.2}/tests/test_dbx_workspace.py +0 -0
  255. {labagent-0.4.1 → labagent-0.4.2}/tests/test_encoding.py +0 -0
  256. {labagent-0.4.1 → labagent-0.4.2}/tests/test_gpu_auto_cloud.py +0 -0
  257. {labagent-0.4.1 → labagent-0.4.2}/tests/test_gpu_console.py +0 -0
  258. {labagent-0.4.1 → labagent-0.4.2}/tests/test_gpu_mig_script.py +0 -0
  259. {labagent-0.4.1 → labagent-0.4.2}/tests/test_gpu_nebius.py +0 -0
  260. {labagent-0.4.1 → labagent-0.4.2}/tests/test_gpu_notebooks.py +0 -0
  261. {labagent-0.4.1 → labagent-0.4.2}/tests/test_gpu_ssh_keys.py +0 -0
  262. {labagent-0.4.1 → labagent-0.4.2}/tests/test_iam_ops.py +0 -0
  263. {labagent-0.4.1 → labagent-0.4.2}/tests/test_launch_file.py +0 -0
  264. {labagent-0.4.1 → labagent-0.4.2}/tests/test_pack_jobs.py +0 -0
  265. {labagent-0.4.1 → labagent-0.4.2}/tests/test_packaging.py +0 -0
  266. {labagent-0.4.1 → labagent-0.4.2}/tests/test_plan.py +0 -0
  267. {labagent-0.4.1 → labagent-0.4.2}/tests/test_rag_app.py +0 -0
  268. {labagent-0.4.1 → labagent-0.4.2}/tests/test_rag_ide.py +0 -0
  269. {labagent-0.4.1 → labagent-0.4.2}/tests/test_rag_ide_ec2.py +0 -0
  270. {labagent-0.4.1 → labagent-0.4.2}/tests/test_rag_ide_local.py +0 -0
  271. {labagent-0.4.1 → labagent-0.4.2}/tests/test_rag_lab.py +0 -0
  272. {labagent-0.4.1 → labagent-0.4.2}/tests/test_rag_local.py +0 -0
  273. {labagent-0.4.1 → labagent-0.4.2}/tests/test_rag_sec.py +0 -0
  274. {labagent-0.4.1 → labagent-0.4.2}/tests/test_rag_tutorial.py +0 -0
  275. {labagent-0.4.1 → labagent-0.4.2}/tests/test_redis_migrate.py +0 -0
  276. {labagent-0.4.1 → labagent-0.4.2}/tests/test_repo_hygiene.py +0 -0
  277. {labagent-0.4.1 → labagent-0.4.2}/tests/test_sweep_moto.py +0 -0
  278. {labagent-0.4.1 → labagent-0.4.2}/tests/test_tf_wrapper.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: labagent
3
- Version: 0.4.1
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
@@ -22,7 +22,7 @@ Every table starts with whose answer it is: `Shadeform . GPU offers . on-demand,
22
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
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
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`, Nebius: `NEBIUS_IAM_TOKEN`, see Nebius below), then the cloud's section of `~/.labagent/credentials`, then, for Lambda, the file `~/.labagent/keys/lambda_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.
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
26
 
27
27
  ## Nebius
28
28
 
@@ -48,6 +48,27 @@ Every table starts with whose answer it is: `Shadeform . GPU offers . on-demand,
48
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
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
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
+
51
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.
52
73
 
53
74
  ## offers
@@ -87,6 +87,34 @@ In a terminal the run is laid out for people: a banner, numbered steps with a li
87
87
  | `login_user` | Shared shell user (default `labagent`, empty = none) |
88
88
  | `login_sudo` | Give that user sudo and docker (default true) |
89
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
+
90
118
  ## GPUs
91
119
 
92
120
  | GPU | `mode` | Labs | Notes |
@@ -0,0 +1,22 @@
1
+ # One H100 on Lambda Cloud, split into 7 MIG slices with one JupyterLab each: one machine, 7 URLs, 7 logins.
2
+ #
3
+ # labagent launch -f examples/launch.lambda.example.yaml --dry-run # show the steps, rent nothing
4
+ # labagent launch -f examples/launch.lambda.example.yaml # BILLED until you destroy it: Lambda never deletes a VM for you
5
+ # labagent destroy -f examples/launch.lambda.example.yaml # the same file removes what it created
6
+ #
7
+ # Look at what is on offer first (read only): labagent compute offers --cloud lambda --gpu H100
8
+ # One-time: an API key in LAMBDA_API_KEY, or under [lambda] in ~/.labagent/credentials, or alone in ~/.labagent/keys/lambda_api_key (chmod 600).
9
+ # One-time: a key every cloud shares: labagent compute ssh-key-add --cloud all --name labagent
10
+ # Not yet verified on a real Lambda VM (see docs/gpu-notebooks.md): run it once before you film.
11
+ description: One H100 on Lambda Cloud, 7 MIG lab slices
12
+ pack: gpu-notebooks
13
+ name: lambda-h100 # destroy needs the same name
14
+ params:
15
+ cloud: lambda
16
+ instance_type: H100 # one GPU (H100x8 is eight); Lambda's own name gpu_1x_h100_pcie works too
17
+ location: north-america # cheapest available H100 there; or set region: us-west-3 to pin one
18
+ # max_price: 4 # most you will pay per hour, when picking by location
19
+ mode: mig # one hardware-isolated slice per lab: 7 labs on one H100
20
+ # The private key to log in with. Set SSH_KEY_FILE, or the default below is used.
21
+ ssh_key_file: ${SSH_KEY_FILE:-~/.labagent/keys/labagent_ed25519}
22
+ # show_passwords: 'no' # keep the tokens out of the printed report (they stay in the credentials file)
@@ -0,0 +1,20 @@
1
+ # One H100 on Nebius, split into 7 MIG slices with one JupyterLab each (a VM). For ONE JupyterLab on a Nebius Devlab (a container) see the end.
2
+ #
3
+ # labagent launch -f examples/launch.nebius.example.yaml --dry-run # show the steps, rent nothing
4
+ # labagent launch -f examples/launch.nebius.example.yaml # BILLED until you destroy it
5
+ # labagent destroy -f examples/launch.nebius.example.yaml # the same file removes what it created
6
+ #
7
+ # Look at what is on offer first (read only): labagent compute offers --cloud nebius --gpu H100
8
+ # One-time: a Nebius login (the `nebius` CLI profile or a service account), and a project (NEBIUS_PROJECT_ID) in the region you want.
9
+ # One-time: a key every cloud shares: labagent compute ssh-key-add --cloud all --name labagent
10
+ # Devlab instead (one JupyterLab, no ssh needed): labagent launch gpu-notebooks-container --name nebius-devlab --cloud nebius --gpu H100
11
+ description: One H100 on Nebius, 7 MIG lab slices
12
+ pack: gpu-notebooks
13
+ name: nebius-h100 # destroy needs the same name
14
+ params:
15
+ cloud: nebius
16
+ instance_type: gpu-h100-sxm/1gpu-16vcpu-200gb
17
+ region: eu-north1 # the region of your Nebius project
18
+ os: ubuntu24.04-cuda13.0
19
+ mode: mig
20
+ ssh_key_file: ${SSH_KEY_FILE:-~/.labagent/keys/labagent_ed25519}
@@ -0,0 +1,21 @@
1
+ # A RunPod pod with RunPod's own JupyterLab: one GPU machine, one URL, one password.
2
+ #
3
+ # labagent launch -f examples/launch.runpod.example.yaml --dry-run # show the steps, rent nothing
4
+ # labagent launch -f examples/launch.runpod.example.yaml # BILLED until you destroy it
5
+ # labagent destroy -f examples/launch.runpod.example.yaml # the same file removes what it created
6
+ #
7
+ # Look at what is on offer first (read only): labagent compute offers --cloud runpod --gpu H100
8
+ # One-time: an API key with the scopes catalog:read, pods:read, pods:write, authentication:read and authentication:write,
9
+ # in RUNPOD_API_KEY, or under [runpod] in ~/.labagent/credentials, or alone in ~/.labagent/keys/runpod_api_key (chmod 600).
10
+ description: One H100 on RunPod Secure Cloud with the cloud's own JupyterLab
11
+ pack: gpu-notebooks-container
12
+ name: runpod-h100 # destroy needs the same name
13
+ params:
14
+ cloud: runpod
15
+ instance_type: NVIDIA H100 80GB HBM3 # RunPod's GPU id; H100 (any one-GPU H100) works too, see `labagent compute offers`
16
+ vendor: runpod-secure # runpod-secure or runpod-community: which RunPod cloud the price belongs to
17
+ region: AP-IN-1 # a data center id; leave out and RunPod picks one (or set location: europe | north-america | asia-pacific)
18
+ # The private key to log in with. Its public half is put on the pod when it is created. Set SSH_KEY_FILE, or the default below is used.
19
+ ssh_key_file: ${SSH_KEY_FILE:-~/.labagent/keys/labagent_ed25519}
20
+ # show_passwords: 'no' # keep the password out of the printed report (it stays in the credentials file)
21
+ # max_price: 5 # most you will pay per hour, when picking by location
@@ -0,0 +1,20 @@
1
+ # One H100 on Shadeform (a marketplace of VMs from many providers), split into 7 MIG slices with one JupyterLab each.
2
+ #
3
+ # labagent launch -f examples/launch.shadeform.example.yaml --dry-run # show the steps, rent nothing
4
+ # labagent launch -f examples/launch.shadeform.example.yaml # BILLED until you destroy it
5
+ # labagent destroy -f examples/launch.shadeform.example.yaml # the same file removes what it created
6
+ #
7
+ # Compare prices across every provider first (read only): labagent compute offers --cloud shadeform --gpu H100
8
+ # One-time: an API key in SHADEFORM_API_KEY, or under [shadeform] in ~/.labagent/credentials.
9
+ # One-time: a key every cloud shares: labagent compute ssh-key-add --cloud all --name labagent
10
+ # Shadeform gives a bare machine with no Jupyter: labagent installs it and gives each slice its own JupyterLab.
11
+ description: One H100 on Shadeform, 7 MIG lab slices
12
+ pack: gpu-notebooks
13
+ name: shadeform-h100 # destroy needs the same name
14
+ params:
15
+ cloud: shadeform
16
+ instance_type: H100
17
+ location: any # the cheapest available H100 on any provider behind Shadeform; or set vendor: and region: to pin one
18
+ # max_price: 4 # most you will pay per hour
19
+ mode: mig
20
+ ssh_key_file: ${SSH_KEY_FILE:-~/.labagent/keys/labagent_ed25519}
@@ -1,3 +1,3 @@
1
1
  """labagent: launch and tear down hands-on labs (RAG, LLM, Databricks) and AWS training sandboxes."""
2
2
 
3
- __version__ = "0.4.1"
3
+ __version__ = "0.4.2"
@@ -26,6 +26,24 @@ def _emit(env: Envelope, output: str) -> None:
26
26
  Path(output).chmod(0o600)
27
27
 
28
28
 
29
+ def _pack_params(pack, given):
30
+ """The command's user-level settings (cloud, gpu, ttl, plus any --param) as the pack's own parameters.
31
+
32
+ `gpu` is the pack's `instance_type` and `ttl` its `hours` (rounded up), unless the pack declares `gpu` or `ttl` itself.
33
+ A pack with no such setting is refused by name instead of silently ignoring a flag that costs money.
34
+ """
35
+ from . import instances
36
+ known = {p.name for p in pack.params}
37
+ out = dict(given)
38
+ for flag, target in (("gpu", "instance_type"), ("ttl", "hours")):
39
+ if flag in out and flag not in known:
40
+ value = out.pop(flag)
41
+ if target not in known:
42
+ raise ValueError(f"the pack {pack.id} has no {flag} setting (it has no {target} parameter)")
43
+ out[target] = value if flag == "gpu" else -(-instances.parse_ttl(value) // 60)
44
+ return out
45
+
46
+
29
47
  def _packs_main(args) -> int:
30
48
  from .packs import registry
31
49
  from .packs.base import run_pack
@@ -35,6 +53,8 @@ def _packs_main(args) -> int:
35
53
  return 0
36
54
  for pid, pk in sorted(registry.all_packs().items()):
37
55
  print(f"{pid:16} {pk.summary}")
56
+ for alias in getattr(pk, "outcome_aliases", ()):
57
+ print(f"{alias:16} {pk.summary} (alias of {pid})")
38
58
  return 0
39
59
  from . import spec as spec_mod
40
60
  try:
@@ -43,30 +63,59 @@ def _packs_main(args) -> int:
43
63
  if not token:
44
64
  print("error: give a pack name, or a launch file with -f", file=sys.stderr)
45
65
  return 2
66
+ saved = None
67
+ if args.cmd == "destroy" and args.pack and not args.name and not args.file:
68
+ from . import instances
69
+ saved = instances.get(args.pack) # `destroy demo2`: the word is an instance name
70
+ if saved:
71
+ token = saved["pack"]
46
72
  pack = registry.resolve(token)
47
- if args.pack and spec["pack"] and registry.resolve(spec["pack"]).id != pack.id:
73
+ if args.pack and not saved and spec["pack"] and registry.resolve(spec["pack"]).id != pack.id:
48
74
  print(f"error: {args.file} is for the pack '{spec['pack']}', not '{args.pack}'", file=sys.stderr)
49
75
  return 2
50
- given = {**spec["params"], **dict(kv.split("=", 1) for kv in args.param)} # flags win over the file
76
+ explicit = {**spec["params"], **dict(kv.split("=", 1) for kv in args.param)} # flags win over the file
77
+ ttl_minutes = None
78
+ explicit.update({k: getattr(args, k) for k in ("cloud", "gpu", "ttl") if getattr(args, k, None)}) # first-class flags win over --param
79
+ if "ttl" in explicit:
80
+ from . import instances
81
+ ttl_minutes = instances.parse_ttl(explicit["ttl"])
82
+ given = explicit
51
83
  except spec_mod.SpecError as e:
52
84
  print(f"error: {e}", file=sys.stderr)
53
85
  return 2
54
86
  except (KeyError, ValueError) as e:
55
87
  print(f"error: {e.args[0] if e.args else e}", file=sys.stderr)
56
88
  return 2
57
- name = args.name or spec["name"] or pack.default_name
89
+ name = (saved["name"] if saved else None) or args.name or spec["name"] or pack.default_name
58
90
  if not name:
59
91
  print("error: --name is required for this pack", file=sys.stderr)
60
92
  return 2
93
+ from . import instances
94
+ try:
95
+ if args.cmd == "destroy":
96
+ saved = saved or instances.get(name)
97
+ if saved and saved.get("pack") == pack.id:
98
+ old = dict(saved.get("params") or {})
99
+ if "instance_type" in given:
100
+ old.pop("gpu", None) # an explicit shape beats the saved --gpu
101
+ if "hours" in given:
102
+ old.pop("ttl", None)
103
+ given = {**old, **given} # explicit flags and params override what launch saved
104
+ pack_params = _pack_params(pack, given)
105
+ except (instances.InstanceError, ValueError) as e:
106
+ print(f"error: {e}", file=sys.stderr)
107
+ return 2
61
108
  from .console import Console
62
109
  console = Console(color=args.color) # progress goes to stderr; styled only for a person at a terminal
63
110
  pretty = console.color
64
111
  if pretty:
65
112
  console.banner(pack.id, args.cmd, name, args.dry_run)
66
113
  try:
67
- env = run_pack(pack, args.cmd, name, given, dry_run=args.dry_run, log=console.log if pretty else None, ui=console if pretty else None)
114
+ env = run_pack(pack, args.cmd, name, pack_params, dry_run=args.dry_run, log=console.log if pretty else None, ui=console if pretty else None)
68
115
  finally:
69
116
  console.close()
117
+ if not args.dry_run:
118
+ _remember(args.cmd, pack, name, given, ttl_minutes, env)
70
119
  output = args.output
71
120
  if output is None and (args.json or not (pretty and sys.stdout.isatty())):
72
121
  output = "-" # a pipe, a file or --json gets the result document, exactly as before
@@ -77,6 +126,43 @@ def _packs_main(args) -> int:
77
126
  return env.exit_code
78
127
 
79
128
 
129
+ def _remember(action: str, pack, name: str, given, ttl_minutes, env) -> None:
130
+ """Keep instances.json in step with the run. Never fails a launch or a destroy: it is only a shortcut."""
131
+ from . import instances
132
+ from .packs.base import state_path
133
+ try:
134
+ if action == "launch" and (env.status == "ok" or state_path(pack.id, name).exists()):
135
+ instances.record(name, pack.id, given, ttl_minutes)
136
+ elif action == "destroy" and env.status == "ok":
137
+ instances.forget(name)
138
+ except (OSError, instances.InstanceError) as e:
139
+ print(f"warning: could not update {instances.path()}: {e}", file=sys.stderr)
140
+
141
+
142
+ def _status_main(args) -> int:
143
+ from . import instances
144
+ from .packs import registry
145
+ try:
146
+ defaults = {}
147
+ for pid, pk in registry.all_packs().items():
148
+ d = {p.name: p.default for p in pk.params}
149
+ defaults[pid] = {"cloud": d.get("cloud"), "gpu": d.get("instance_type")}
150
+ items = instances.rows(defaults=defaults)
151
+ except instances.InstanceError as e:
152
+ print(f"error: {e}", file=sys.stderr)
153
+ return 2
154
+ if args.output:
155
+ text = json.dumps({"instances": items}, indent=2)
156
+ if args.output == "-":
157
+ print(text)
158
+ else:
159
+ Path(args.output).write_text(text, encoding="utf-8")
160
+ Path(args.output).chmod(0o600)
161
+ return 0
162
+ print(instances.table(items))
163
+ return 0
164
+
165
+
80
166
  def _finish(console, env, pack_id: str, action: str, name: str, dry_run: bool, shown_json: bool) -> None:
81
167
  """The closing lines of a styled run: what to do next, and how to get the result document."""
82
168
  s = console.s
@@ -98,7 +184,7 @@ def _finish(console, env, pack_id: str, action: str, name: str, dry_run: bool, s
98
184
  console.line(" " + s("The result as JSON: add --json, or --output FILE.", "gray"))
99
185
 
100
186
 
101
- KNOWN = {"run", "packs", "rag", "dataset", "launch", "destroy", "compute", "bootstrap-path", "commands"}
187
+ KNOWN = {"run", "packs", "rag", "dataset", "launch", "destroy", "status", "compute", "bootstrap-path", "commands"}
102
188
 
103
189
 
104
190
  def _nl_main(argv) -> int:
@@ -167,15 +253,23 @@ def main(argv=None) -> int:
167
253
  dp.add_argument("--out", required=True, help="Output directory")
168
254
  for verb, text in (("launch", "Deploy a lab pack (idempotent: re-run to resume)"), ("destroy", "Remove what a pack created")):
169
255
  lp = sub.add_parser(verb, help=text)
170
- lp.add_argument("pack", nargs="?", help="Pack id (or give it in the launch file)")
256
+ lp.add_argument("pack", nargs="?", help="Pack id (or give it in the launch file). destroy also takes an instance name: labagent destroy demo2")
171
257
  lp.add_argument("-f", "--file", metavar="FILE", help="YAML launch file with pack, name and params. Flags on the command line override it")
172
258
  lp.add_argument("--name", help="Instance name (state key and resource suffix); defaults to the pack's own default")
259
+ if verb == "launch":
260
+ lp.add_argument("--cloud", metavar="PROVIDER", help="Cloud to use, e.g. runpod, lambda, shadeform. Same as --param cloud=...; wins over it")
261
+ lp.add_argument("--gpu", metavar="MODEL", help="GPU shape, e.g. H100 or H100x8. Becomes the pack's instance_type; wins over --param")
262
+ lp.add_argument("--ttl", metavar="DURATION", help="Planned lifetime, e.g. 90m, 2h, 1d. Becomes the pack's hours (rounded up). Only shadeform deletes "
263
+ "the machine at that time: elsewhere it is a planned end and you must run destroy")
173
264
  lp.add_argument("--param", action="append", default=[], metavar="KEY=VALUE", help="Pack parameter, repeatable")
174
265
  lp.add_argument("--dry-run", action="store_true", help="Show the steps without running them")
175
266
  lp.add_argument("--output", default=None, help="Result envelope path, or - for stdout (default: stdout, unless it is a terminal)")
176
267
  lp.add_argument("--json", action="store_true", help="Print the result envelope even on a terminal (the default when stdout is a pipe or a file)")
177
268
  lp.add_argument("--color", choices=("auto", "always", "never"), default="auto",
178
269
  help="Colour and live progress: auto = only on a terminal, and never with NO_COLOR set")
270
+ st = sub.add_parser("status", help="List the instances launched from this machine (from ~/.labagent/instances.json)")
271
+ st.add_argument("--output", default=None, metavar="FILE", help="Write the list as JSON to FILE, or - for stdout, instead of the table")
272
+ st.add_argument("--json", action="store_true", help="Same as --output -")
179
273
  sub.add_parser("bootstrap-path", help="Print the path of the packaged Terraform state-backend module")
180
274
  sub.add_parser("commands", help="List supported job commands")
181
275
  args = p.parse_args(argv)
@@ -202,6 +296,10 @@ def main(argv=None) -> int:
202
296
  return rag_cli.run(args)
203
297
  if args.cmd == "compute":
204
298
  return compute_cli.run(args)
299
+ if args.cmd == "status":
300
+ if args.json and not args.output:
301
+ args.output = "-"
302
+ return _status_main(args)
205
303
  if args.cmd in ("packs", "launch", "destroy"):
206
304
  return _packs_main(args)
207
305
  if args.cmd == "commands":
@@ -122,7 +122,8 @@ def heading(title: str, what: str, detail: str, fetched_at: Optional[str], s: St
122
122
 
123
123
 
124
124
  def offers_text(cloud: str, offers: List[Offer], total: int, show_all: bool, s: Optional[Style] = None, title: str = "",
125
- fetched_at: Optional[str] = None, dot: str = "-") -> str:
125
+ fetched_at: Optional[str] = None, dot: str = "-", clouds: Optional[List[str]] = None) -> str:
126
+ """`clouds`, when given, is the cloud of each offer (a search across every cloud): a CLOUD column is added and the launch hint uses the first row's cloud."""
126
127
  s = s or Style(False)
127
128
  shown = "on-demand" + (", including sold out" if show_all else ", available now")
128
129
  count = f"{len(offers)} of {total} offers" if total > len(offers) else f"{total} offers"
@@ -130,23 +131,30 @@ def offers_text(cloud: str, offers: List[Offer], total: int, show_all: bool, s:
130
131
  if not offers:
131
132
  return top + ("No offers match" + ("" if show_all else " right now") + ". Capacity changes within minutes: try again, widen the filters, "
132
133
  "or add --all to include what is sold out.")
133
- header = ["VENDOR", "REGION", "TYPE", "GPUS", "GPU", "VRAM", "$/H", "KIND", "LABS"] + (["STOCK"] if show_all else []) + ["OS IMAGES"]
134
+ header = (["CLOUD"] if clouds else []) + ["VENDOR", "REGION", "TYPE", "GPUS", "GPU", "VRAM", "$/H", "KIND", "LABS"] + (["STOCK"] if show_all else []) + ["OS IMAGES"]
134
135
  rows = []
135
- for o in offers:
136
- labs = max_labs(o)
137
- rows.append([_clean(o.vendor), _clean(o.region), _clean(o.instance_type), str(o.num_gpus), _clean(o.gpu_type), f"{o.vram_gb}G",
136
+ for i, o in enumerate(offers):
137
+ labs = None if o.kind == "container" else max_labs(o) # MIG slices do not exist in a container (the JSON field is unchanged)
138
+ rows.append(([_clean(clouds[i])] if clouds else []) + [_clean(o.vendor), _clean(o.region), _clean(o.instance_type), str(o.num_gpus), _clean(o.gpu_type), f"{o.vram_gb}G",
138
139
  f"{o.hourly_usd:.2f}", _clean(o.kind), str(labs) if labs else "-"]
139
140
  + (["yes" if o.available else "no"] if show_all else []) + [_clean(", ".join(o.os_options)) or "-"])
140
141
  lines = [top, _table(rows, header, _painter(s) if s.on else None)]
141
142
  if total > len(offers):
142
143
  lines.append(f"\n{total - len(offers)} more not shown: narrow with --gpu, --gpus, --vendor, --region or --max-price, or raise --limit.")
143
- first = next((o for o in offers if o.available), None)
144
+ first_i = next((i for i, o in enumerate(offers) if o.available), None)
145
+ first = offers[first_i] if first_i is not None else None
144
146
  if first:
147
+ if clouds:
148
+ cloud = clouds[first_i]
145
149
  p = launch_params(cloud, first)
146
150
  flags = " ".join(f"--param {shlex.quote(f'{k}={_clean(v)}')}" for k, v in p.items()) # it is pasted into a shell
147
151
  keys = f"labagent compute ssh-keys --cloud {shlex.quote(_clean(cloud))}"
148
- lines.append(f"\nNext, for the first available row (pick an os above; ssh_key_id from `{keys}`):\n "
149
- + s(f"labagent launch gpu-notebooks --name <name> {flags} --param os=<image> --param ssh_key_id=<id>", "cyan"))
152
+ if first.kind == "container":
153
+ lines.append("\nNext, for the first available row (a container: no Docker or MIG, so one JupyterLab on the whole GPU):\n "
154
+ + s(f"labagent launch gpu-notebooks-container --name <name> {flags}", "cyan"))
155
+ else:
156
+ lines.append(f"\nNext, for the first available row (pick an os above; ssh_key_id from `{keys}`):\n "
157
+ + s(f"labagent launch gpu-notebooks --name <name> {flags} --param os=<image> --param ssh_key_id=<id>", "cyan"))
150
158
  lines.append(s("LABS = MIG slices at the smallest size, an estimate; - means unknown. Capacity changes within minutes.", "gray"))
151
159
  return "\n".join(lines)
152
160
 
@@ -187,7 +195,7 @@ def add_parser(sub) -> None:
187
195
  k.add_argument("--json", action="store_true", help="Machine-readable output for a console or script")
188
196
  k.add_argument("--color", **colour)
189
197
 
190
- o = cs.add_parser("offers", help="List GPU machines you can rent right now from one cloud, cheapest first")
198
+ o = cs.add_parser("offers", help="List GPU machines you can rent right now, cheapest first. Without --cloud: every cloud whose API key is set")
191
199
  o.add_argument("--cloud", **cloud)
192
200
  o.add_argument("--gpu", metavar="TYPE", help="GPU family, e.g. H100, H200, A100, L40S")
193
201
  o.add_argument("--gpus", type=int, metavar="N", help="Exactly this many GPUs per machine, e.g. 8")
@@ -256,6 +264,8 @@ def _run(args, kind: str, con: Console):
256
264
  if kind == "ssh-key-add" and getattr(args, "cloud", None) == ALL:
257
265
  return _key_add_all(args, s)
258
266
  query = _query(args) if kind == "offers" else None # a bad flag is refused before any call to the cloud
267
+ if kind == "offers" and not getattr(args, "cloud", None):
268
+ return _offers_everywhere(args, query, s, dot)
259
269
  provider = _provider(args)
260
270
  for w in getattr(provider, "warnings", []):
261
271
  print(f"warning: {w}", file=sys.stderr)
@@ -276,6 +286,37 @@ def _run(args, kind: str, con: Console):
276
286
  return offers_text(args.cloud, shown, len(found), args.all, s, title, fetched, dot)
277
287
 
278
288
 
289
+ def _offers_everywhere(args, query: OfferQuery, s: Style, dot: str):
290
+ """No --cloud: ask every cloud whose API key is set and merge the offers, cheapest first. One cloud failing is a warning, not an error."""
291
+ configured = [c for c in providers.catalog() if c["credentials"]["configured"] and "offers" in c["capabilities"]]
292
+ if not configured:
293
+ raise ComputeError(f"no cloud has an API key set, so there is nothing to search. Available: {', '.join(sorted(providers.PROVIDERS))}. "
294
+ "Set a key (see: labagent compute clouds) or name one with --cloud")
295
+ rows: List[Any] = []
296
+ warnings: List[str] = []
297
+ searched: List[str] = []
298
+ for c in configured:
299
+ try:
300
+ prov = providers.make(c["id"])
301
+ warnings += [f"{c['id']}: {w}" for w in getattr(prov, "warnings", [])]
302
+ rows += [(c["id"], o) for o in prov.offers(query)]
303
+ searched.append(c["id"])
304
+ except ComputeError as e:
305
+ warnings.append(f"{c['id']}: {e}")
306
+ skipped = [c["id"] for c in providers.catalog() if c not in configured]
307
+ if skipped:
308
+ warnings.append("not searched (no API key): " + ", ".join(skipped))
309
+ for w in warnings:
310
+ print(f"warning: {w}", file=sys.stderr)
311
+ rows.sort(key=lambda r: (not r[1].available, r[1].hourly_usd))
312
+ shown = rows[:args.limit] if args.limit else rows
313
+ fetched = _now()
314
+ if args.json:
315
+ return _ok("offers", cloud="all", cloud_title="All clouds", fetched_at=fetched, count=len(rows), returned=len(shown), warnings=warnings, searched=searched,
316
+ offers=[{**offer_json(cid, o), "cloud": cid} for cid, o in shown])
317
+ return offers_text("all", [o for _, o in shown], len(rows), args.all, s, "All clouds (" + ", ".join(searched) + ")", fetched, dot, clouds=[c for c, _ in shown])
318
+
319
+
279
320
  def _key_name(args) -> str:
280
321
  name = (args.name or "").strip()
281
322
  if not re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9 _.-]{0,59}", name):
@@ -235,6 +235,9 @@ class NebiusProvider(Provider):
235
235
  key_file = "nebius_iam_token" # ~/.labagent/keys/nebius_iam_token holds just the token
236
236
  auto_delete = False
237
237
  key_registry = False # the key goes into the VM at creation, not into the account
238
+ vendor = VENDOR # NebiusDevlabProvider changes these three: same project, same platforms, a container instead of a VM
239
+ offer_kind = "vm"
240
+ offer_os = IMAGES
238
241
 
239
242
  @classmethod
240
243
  def extra_credentials(cls) -> Optional[str]:
@@ -341,7 +344,7 @@ class NebiusProvider(Provider):
341
344
  return [] # a project is in one region
342
345
  if query.area not in (None, "", "any") and nebius_area(region) != query.area:
343
346
  return []
344
- if not _same(VENDOR, query.vendor) or query.kind not in (None, "", "vm"):
347
+ if not _same(self.vendor, query.vendor) or query.kind not in (None, "", self.offer_kind):
345
348
  return []
346
349
  try:
347
350
  platforms = self._list("/compute/v1/platforms")
@@ -365,9 +368,9 @@ class NebiusProvider(Provider):
365
368
  and (query.max_price is None or price <= query.max_price)):
366
369
  continue
367
370
  vram = int(spec.get("gpuMemoryGibibytes") or (int(res.get("gpuMemoryGibibytes") or 0) // gpus)) or VRAM_GB.get(family, 0)
368
- out.append(Offer(instance_type=native, vendor=VENDOR, region=region, hourly_usd=price, available=True, region_name=region, gpu_type=family,
371
+ out.append(Offer(instance_type=native, vendor=self.vendor, region=region, hourly_usd=price, available=True, region_name=region, gpu_type=family,
369
372
  num_gpus=gpus, vram_gb=vram, vcpus=int(res.get("vcpuCount") or 0), memory_gb=int(res.get("memoryGibibytes") or 0),
370
- storage_gb=BOOT_GIB, interconnect="SXM" if name.endswith("sxm") else "", kind="vm", os_options=list(IMAGES),
373
+ storage_gb=BOOT_GIB, interconnect="SXM" if name.endswith("sxm") else "", kind=self.offer_kind, os_options=list(self.offer_os),
371
374
  area_hint=nebius_area(region)))
372
375
  out.sort(key=lambda o: (o.hourly_usd, o.region, o.instance_type))
373
376
  return out