fix: use production appimage slicer for local U1

This commit is contained in:
wlx committed 2026-08-26 15:06:34 +08:00
1 parent ef048336ae
commit f67af8c4a8
5 files changed
+131

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
# 本地 U1 切片运行时
本地部署使用从生产环境**只读复制并校验**的 `external-tools` 运行时。生产服务器未被修改,二进制包不提交到 Git。
## 校验记录
- 归档:`external-tools-production-20260416.tar.gz`
- 归档 SHA256:`820a4cea7f6e0914846c8dac61be803b1116c44f25205c3048a7762a8475e3af`
- 本地运行时:`/srv/ai-soulmate/runtime/external-tools-production-20260416`
- AppRun SHA256:`951984442c0b416fd14714ac5f271f427d84566f533ec43fe719598875e3fb6c`
- AppImage SHA256:`d3676edc0e5385deb537a44e87496a4c7b631007884bad5234dcc4f5c8d8b09b`
- U1 profile 数量:`73`
## U1 配置
- 机器:`Snapmaker/machine/Snapmaker U1 (0.4 nozzle).json`
- 白色 PLA:`Snapmaker/filament/Snapmaker PLA @U1.json`
- 官方工艺:`Snapmaker/process/0.20 Standard @Snapmaker U1 (0.4 nozzle).json`
- 本地工艺:`/app/local-profiles/u1-compatible-generic-process.json`
- 切片器:`/app/external-tools/bin/Snapmaker_Orca_Linux_AppImage_Ubuntu2404_V2.3.0_Beta.AppImage`
Compose 将运行时挂载为 `/app/external-tools:ro`,将本地派生过程挂载为 `/app/local-profiles:ro`。生产式调用必须设置 `APPIMAGE_EXTRACT_AND_RUN=true`;直接调用 `AppRun` 已验证会失败。官方 U1 工艺在当前 Orca CLI 版本中返回 `127`,因此本地先使用通用 Snapmaker 工艺并将兼容机型改为 U1;这不修改原始 profile。
## 部署要求
服务器上完成解压后,运行:
```bash
./scripts/prepare-u1-local-profile.sh
./scripts/configure-backend-env.sh \
compose/.env \
/srv/ai-soulmate/sources/ai-soulmate-server \
192.168.3.102 \
farm-workstation-001
docker compose --env-file compose/.env \
-f compose/docker-compose.backend.yml config --quiet
```
准备脚本只读取外部工具中的通用 Snapmaker 工艺,并生成 `/srv/ai-soulmate/runtime/u1-profiles/u1-compatible-generic-process.json`。该文件不包含生产密钥,也不提交到 Git。
不要把运行时目录、归档或任何生产密钥提交到 Git。首次真实打印前,客户端应保持 `download_only` 或 `upload_only`,确认 G-code 后再单独批准启动。