fix(cli): forward --quiet/--gpu flags into Docker container

- Forward --quiet so the container suppresses its own output, avoiding
  duplicate render progress from both host and container
- When quiet, still inherit stderr so container errors surface
- Pass --gpus all to docker run when --gpu is set, so the container
  actually has GPU access for FFmpeg encoding

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vance Ingalls
2026-04-06 17:55:51 -07:00
co-authored by Claude Opus 4.6
parent 623a8ee067
commit 9837962fa8
+8 -2
View File
@@ -401,7 +401,12 @@ async function renderDocker(
"--workers",
String(options.workers),
];
if (options.gpu) dockerArgs.push("--gpu");
if (options.quiet) dockerArgs.push("--quiet");
// GPU encoding requires host GPU access via --gpus
if (options.gpu) {
dockerArgs.splice(dockerArgs.indexOf("--rm") + 1, 0, "--gpus", "all");
dockerArgs.push("--gpu");
}
if (!options.quiet) {
console.log(c.dim(" Running render in Docker container..."));
@@ -411,7 +416,8 @@ async function renderDocker(
try {
await new Promise<void>((resolvePromise, reject) => {
const child = spawn("docker", dockerArgs, {
stdio: options.quiet ? "pipe" : "inherit",
// When quiet, still show stderr so container errors surface
stdio: options.quiet ? ["pipe", "pipe", "inherit"] : "inherit",
});
child.on("close", (code) => {
if (code === 0) resolvePromise();