@aiuby-ia/cli 0.5.0 → 0.5.1

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.
package/dist/aiuby.mjs CHANGED
@@ -20485,6 +20485,7 @@ var noControl = (v) => !CONTROL_CHARS.test(v);
20485
20485
  var ENV_NAME = /^[A-Z_][A-Z0-9_]{0,63}$/;
20486
20486
  var RESERVED_ENV = /* @__PURE__ */ new Set(["PORT", "K_SERVICE", "K_REVISION", "K_CONFIGURATION"]);
20487
20487
  var MAX_ENV_VARS = 50;
20488
+ var MAX_ARGS = 30;
20488
20489
  var IMAGE_REF = /^(?!.*\/\/)[A-Za-z0-9][A-Za-z0-9._\-/:@]*$/;
20489
20490
  var HardwareRequest = external_exports.object({
20490
20491
  /** `any`: o planejador escolhe entre os provedores habilitados. */
@@ -20499,6 +20500,8 @@ var AppConfig = external_exports.object({
20499
20500
  runtime: external_exports.enum(["container", "python"]),
20500
20501
  image: external_exports.string().min(1).max(300).regex(IMAGE_REF, "image precisa ser uma refer\xEAncia de imagem de container, sem espa\xE7os").nullable().default(null),
20501
20502
  entrypoint: external_exports.string().min(1).max(300).refine(noControl, "entrypoint n\xE3o aceita caracteres de controle").nullable().default(null),
20503
+ /** Argumentos do processo da imagem (substituem o `CMD`). Vazio: vale o que a imagem define. */
20504
+ args: external_exports.array(external_exports.string().min(1).max(300).refine(noControl, "args n\xE3o aceita caracteres de controle")).max(MAX_ARGS, `no m\xE1ximo ${MAX_ARGS} argumentos`).default([]),
20502
20505
  port: external_exports.number().int().min(1).max(65535).default(8080),
20503
20506
  /**
20504
20507
  * Variáveis de ambiente da aplicação. Ficam na configuração, visíveis a quem vê a
@@ -20771,7 +20774,9 @@ async function appsUpdate(io, args) {
20771
20774
  const app = readAppFile(io, file2);
20772
20775
  const stored = requireLogin();
20773
20776
  const current = await apiGet(stored, `/api/platform/compute/apps/${encodeURIComponent(app.slug)}`, io.fetcher);
20774
- const latest = current.revisions.find((r) => r.revision === current.currentRevision)?.config;
20777
+ const stored_ = current.revisions.find((r) => r.revision === current.currentRevision)?.config;
20778
+ const normalized = stored_ ? AppConfig.safeParse(stored_) : null;
20779
+ const latest = normalized?.success ? normalized.data : stored_;
20775
20780
  if (latest && JSON.stringify(sortKeys(latest)) === JSON.stringify(sortKeys(app.config))) {
20776
20781
  emit(io, { id: current.id, slug: current.slug, revision: current.currentRevision, changed: false }, () => io.out(`Sem mudan\xE7a: ${current.slug} j\xE1 est\xE1 com essa configura\xE7\xE3o (r${current.currentRevision}).`));
20777
20782
  return;
@@ -20836,7 +20841,7 @@ var notYet = (command) => async () => {
20836
20841
  };
20837
20842
 
20838
20843
  // src/main.ts
20839
- var VERSION = "0.5.0";
20844
+ var VERSION = "0.5.1";
20840
20845
  var HELP = `aiuby ${VERSION} \u2014 linha de comando do AIUBY Compute
20841
20846
 
20842
20847
  Uso: aiuby <comando> [op\xE7\xF5es]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiuby-ia/cli",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Linha de comando do AIUBY Compute",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,7 @@
1
- # Servidor compatível com a API da OpenAI sobre vLLM. O modelo é baixado na subida:
1
+ # Opcional: o aiuby.toml já usa a imagem oficial do vLLM com o modelo nos argumentos. Use este
2
+ # Dockerfile só se quiser uma imagem própria (por exemplo, com o modelo fixo). O modelo é baixado na subida:
2
3
  # escolha um que caiba na memória da GPU pedida e cuja licença permita o seu uso.
3
4
  FROM vllm/vllm-openai:latest
4
- ENV MODEL_ID="Qwen/Qwen2.5-1.5B-Instruct"
5
+ ENV MODEL_ID="microsoft/Phi-3-mini-4k-instruct" HF_HOME="/tmp/hf"
5
6
  EXPOSE 8080
6
7
  ENTRYPOINT ["/bin/sh", "-c", "python3 -m vllm.entrypoints.openai.api_server --model \"$MODEL_ID\" --host 0.0.0.0 --port 8080"]
@@ -1,12 +1,17 @@
1
- # Inferência compatível com OpenAI em GPU. Valide com: aiuby config validate
1
+ # Inferência compatível com OpenAI em GPU, com a imagem oficial do vLLM e o Phi-3 mini.
2
+ # Não precisa construir imagem: os argumentos escolhem o modelo. Valide com: aiuby config validate
2
3
  name = "Inferência vLLM"
3
4
  slug = "inferencia-vllm"
4
5
 
5
6
  [config]
6
7
  runtime = "container"
7
- image = "REGISTRO/inferencia-vllm:1"
8
+ image = "docker.io/vllm/vllm-openai:latest"
9
+ args = ["--model", "microsoft/Phi-3-mini-4k-instruct", "--host", "0.0.0.0", "--port", "8080", "--max-model-len", "4096"]
8
10
  port = 8080
9
11
 
12
+ [config.env]
13
+ HF_HOME = "/tmp/hf"
14
+
10
15
  [config.hardware]
11
16
  provider = "gcp"
12
17
  cpu = 4