mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-14 13:27:13 +00:00
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:
co-authored by
Claude Opus 4.6
parent
623a8ee067
commit
9837962fa8
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user