跳转到内容
Rayrun
登录注册

命令与文件

终端窗口
rayrun exec demo -- sh -c 'echo out; echo err >&2; exit 3'
  • 同步:响应即命令结束;stdout / stderr 分离输出;
  • 退出码透传(0–255);命令超时 → 124(timeout(1) 惯例);
  • 命令原样传递、不经 shell 包装 —— 需要 shell 特性时自行写 sh -c '...'。

同步语义适合短命令与脚本;跑得久的任务(Agent 任务、交互会话)用 运行 Agent 任务与终端。

终端窗口
rayrun files ls --sandbox <id> --path /
rayrun files get --sandbox <id> --path a.txt --out ./a.txt
cat ./x.bin | rayrun files put --sandbox <id> --path /x.bin --stdin
  • 路径以工作区为界(相对镜像声明的 workdir);工作区跨停止 / 启动保留;
  • put 不设大小上限(控制台上传页有 100 MiB 的预检,CLI / API 直连没有)。

REST 等价物:文件。