berth run --as NAME with no command should fall back to the engine entry's start
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
Hướng nghiên cứu
Đọc internal/cli/run.go và theo dõi cách berth run --as NAME tải mục engine và xử lý khi thiếu lệnh. Dùng start của mục đó nếu có, giữ nguyên hành vi ghi đè bằng flag hiện có; giữ lỗi khi thiếu mục hoặc thiếu start của mục. Hoàn tất khi các bài kiểm thử bao quát cả hành vi dự phòng và trường hợp thiếu start, đồng thời CLI chạy lệnh đã cấu hình.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Current behavior
berth run requires the command after -- and refuses to run without it (--as NAME and the engine's command are required, internal/cli/run.go). The berth.toml entry for --as NAME supplies every setting — priority, needs_mib, the drain_* fields, container, compose, min_turn — but the command itself is never taken from the entry, even when the entry already carries one in start.
So a fully configured engine still needs the command re-typed on every run:
F:\AI\berth\berth.exe run --as pet-tagger --priority foreground -- docker compose -f "F:\AI\immich-pet-tagger\docker-compose.yml" up
with the compose path written twice (once for compose, once in the command).
Why it works
The entry already holds a complete command in start, and the gateway already treats start as a first-class start vector: it starts engines from it on demand (a request for the engine's url finds it not answering) and for background engines. So the configuration is already complete; only the CLI path doesn't use it.
Config validation already keeps the eligible set well-defined: a start without serves is an error unless the engine is background or comfyui, so an entry with a usable start is unambiguous.
Suggestion
When berth run --as NAME gets no command, exec the entry's start as the command, with the same flag-wins-override semantics the entry already has for the other settings. Keep the current error when the entry is missing or has no start.
Environment
- Windows 11, RTX 5070 Ti (16 GiB)
- berth v0.4.0-rc.3 binary; code verified at main @
0ebd1c5
Engine entry used for the runs above:
[[engine]]
name = "pet-tagger"
type = "custom"
kind = "other"
url = "http://127.0.0.1:8000" # placeholder
health = "/" # placeholder
start = ["docker", "compose", "-f", "F:\\AI\\immich-pet-tagger\\docker-compose.yml", "up"]
compose = "F:\\AI\\immich-pet-tagger\\docker-compose.yml"
background = true
idle_after = "60s"
needs_mib = 2560
priority = "batch"
min_turn = "100s"
- Ngôn ngữ chính
- Go
- Star
- 226
- Fork
- 20
- Merge trung bình
- 43 phút
- Pull request đã merge (30 ngày)
- 192
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của T-Crypt/berth
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
T-Crypt/berth#204 · 11 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
T-Crypt/berth#197 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
berthd --gpu-backend amd exits at startup on a desktop session: "process VRAM exceeds card usage"Đang mở
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 48/100
T-Crypt/berth#196 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Lend part of a card from a running engine and get it back, without a park or a reloadCó thể đã có người làm @T-Crypt đã nhận 5 ngày trước. Đang mở
T-Crypt/berth#189 · 23 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của T-Crypt/berth
Issue tương tự
-
bug converter
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
grafana/sigma-rule-deployment#435 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
google/go-containerregistry#2491 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
stranded-follow-up sweep trusts any issue whose body carries the marker as the tracking issueĐang mởtype:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
nightgauge/nightgauge#2688 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
aiac enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày