Skip to content

fix(jetson): remove GPL video codecs, fix ffmpeg/examples/healthcheck#1190

Open
toolboc wants to merge 3 commits into
ace-step:mainfrom
toolboc:feat/jetson-docker-support
Open

fix(jetson): remove GPL video codecs, fix ffmpeg/examples/healthcheck#1190
toolboc wants to merge 3 commits into
ace-step:mainfrom
toolboc:feat/jetson-docker-support

Conversation

@toolboc

@toolboc toolboc commented May 6, 2026

Copy link
Copy Markdown
Contributor

Addresses review feedback from #793 and #735:

  • Remove unused x264/x265 GPL video codecs from FFmpeg build (audio-only paths don't need them, avoids GPL license complexity)
  • Remove --disable-programs so ffmpeg CLI binary is available for MP3 export in audio_utils.py
  • Pin bitsandbytes>=0.49.0,<0.51 for aarch64 stability
  • Fix healthcheck port variable to API_PORT matching docker-compose.jetson.yml
  • Add examples symlink workaround for _get_project_root() path resolution bug in api_routes.py

Summary by CodeRabbit

  • Changes

    • Removed x264/x265 (GPL) options from FFmpeg build; enabled MP3/Opus/Vorbis support.
    • Restricted bitsandbytes to a narrower version range for compatibility.
  • New Features

    • Added nano-vllm installation with an explicit post-install verification.
  • Improvements

    • Healthchecks now probe both Gradio and API endpoints with configurable port fallbacks.
    • Runtime setup now creates additional runtime paths and respects explicit API port for startup.

- Remove unused x264/x265 GPL video codecs from FFmpeg build (audio-only)
- Remove --disable-programs so ffmpeg CLI is available for MP3 export
- Pin bitsandbytes to >=0.49.0,<0.51 for aarch64 stability
- Fix healthcheck port variable to match docker-compose (API_PORT)
- Add examples symlink workaround for _get_project_root() path bug
@coderabbitai

coderabbitai Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4447cc4c-d896-4792-a1c2-8cab8628e68c

📥 Commits

Reviewing files that changed from the base of the PR and between 5ccc4e6 and 110b75d.

📒 Files selected for processing (1)
  • Dockerfile.jetson
🚧 Files skipped from review as they are similar to previous changes (1)
  • Dockerfile.jetson

📝 Walkthrough

Walkthrough

Jetson Dockerfile: replaced video codec dev packages with audio/assembly tools, reconfigured FFmpeg to drop GPL/x264/x265 and enable audio codecs, tightened bitsandbytes pin, added nano-vllm post-install sanity check, created additional runtime symlink, and expanded healthcheck and entrypoint API-port resolution.

Changes

Jetson Build Configuration and Dependencies

Layer / File(s) Summary
System Dependencies
Dockerfile.jetson
Removed libx264-dev, libx265-dev; added libsndfile1-dev, nasm, yasm to apt install.
FFmpeg Build Configuration
Dockerfile.jetson
Dropped --enable-gpl, --enable-libx264, --enable-libx265, and --disable-programs; enabled --enable-libmp3lame, --enable-libopus, --enable-libvorbis; kept shared libs and --disable-doc.
Python Dependencies
Dockerfile.jetson
Constrained bitsandbytes to >=0.49.0,<0.51.
nano-vllm Installation & Validation
Dockerfile.jetson
Installs nano-vllm from bundled source and runs python -c "import nanovllm; ..." as a post-install import sanity check.
Runtime Environment Setup
Dockerfile.jetson
Creates /app/checkpoints, /app/gradio_outputs and symlinks /app/examples/app/acestep/ui/examples.
Healthcheck & Entrypoint Port Handling
Dockerfile.jetson
Healthcheck now probes Gradio (GRADIO_PORT) then API (API_PORTACESTEP_API_PORT8001); entrypoint derives API port from API_PORT with fallback to ACESTEP_API_PORT and updates startup messaging accordingly.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant HC as Container Healthcheck
    participant GR as Gradio Server
    participant API as API Server
    HC->>GR: HTTP probe on ${GRADIO_PORT}
    alt Gradio OK
        HC-->>HC: pass
    else Gradio not ready
        HC->>API: HTTP probe on ${API_PORT}/${ACESTEP_API_PORT}/8001
        alt API OK
            HC-->>HC: pass
        else
            HC-->>HC: fail
        end
    end
    Note right of API: Entrypoint uses API_PORT → ACESTEP_API_PORT fallback for startup
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • ace-step/ACE-Step-1.5#793: Modifies the same Dockerfile.jetson with overlapping FFmpeg configuration, bitsandbytes pinning, and nano-vllm installation.

Suggested reviewers

  • ChuxiJ

Poem

🐰 I hopped through Docker, swapped codecs for song,
Built FFmpeg lighter, made dependencies strong.
Nano‑vllm said "hi" with a quick import test,
Healthchecks now knock on both ports to rest.
A rabbit cheers—container ready, dressed!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main changes: removing GPL video codecs (x264/x265), fixing FFmpeg build, fixing examples symlink, and fixing healthcheck configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Dockerfile.jetson`:
- Around line 282-285: The HEALTHCHECK is probing ${API_PORT:-8001} while the
entrypoint starts the API server using ${ACESTEP_API_PORT:-8001}, causing a
mismatch if only API_PORT is overridden; update the HEALTHCHECK command to probe
the same effective port expression used by the entrypoint (use the nested
fallback ${API_PORT:-${ACESTEP_API_PORT:-8001}}) and change the entrypoint echo
and the python --port argument in the API start command to also use
${API_PORT:-${ACESTEP_API_PORT:-8001}} so both the probe and the server use the
identical port resolution.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f4d432d8-0a08-4676-8df6-11addc590f9d

📥 Commits

Reviewing files that changed from the base of the PR and between 6c1b2ef and b50caf8.

📒 Files selected for processing (1)
  • Dockerfile.jetson

Comment thread Dockerfile.jetson
Use nested fallback ${API_PORT:-${ACESTEP_API_PORT:-8001}} in both the
HEALTHCHECK and entrypoint so the probe and server always resolve the
same port regardless of which env var is set.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
Dockerfile.jetson (1)

242-245: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Fix shell parsing break in runtime-dir RUN command.

At Line 242–Line 245, the inline comments after the continuation cause && ln -sf ... to be parsed as a new command starting with &&, which breaks the build.

Suggested minimal fix
- RUN mkdir -p /app/checkpoints /app/gradio_outputs \
-    # Symlink examples into the path where api_routes.py's _get_project_root()
-    # resolves (acestep/ui/) until the upstream bug is fixed.
-    && ln -sf /app/examples /app/acestep/ui/examples
+ # Symlink examples into the path where api_routes.py's _get_project_root()
+ # resolves (acestep/ui/) until the upstream bug is fixed.
+ RUN mkdir -p /app/checkpoints /app/gradio_outputs \
+    && ln -sf /app/examples /app/acestep/ui/examples
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile.jetson` around lines 242 - 245, The RUN shell line that creates
directories and then symlinks examples is broken by an inline comment placed
after a line-continuation, causing the following "&& ln -sf /app/examples
/app/acestep/ui/examples" to be parsed incorrectly; fix by moving the comment
out of the continued command (either put the explanatory comment on its own line
above the RUN or place it after the entire RUN block), and ensure the RUN uses
proper backslash-newline continuations so the commands stay on the same shell
line (the block referencing ln -sf /app/examples /app/acestep/ui/examples and
the note about _get_project_root() should be kept but not inserted
mid-continuation).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@Dockerfile.jetson`:
- Around line 242-245: The RUN shell line that creates directories and then
symlinks examples is broken by an inline comment placed after a
line-continuation, causing the following "&& ln -sf /app/examples
/app/acestep/ui/examples" to be parsed incorrectly; fix by moving the comment
out of the continued command (either put the explanatory comment on its own line
above the RUN or place it after the entire RUN block), and ensure the RUN uses
proper backslash-newline continuations so the commands stay on the same shell
line (the block referencing ln -sf /app/examples /app/acestep/ui/examples and
the note about _get_project_root() should be kept but not inserted
mid-continuation).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 47d3f5fd-3dbe-4d65-9949-7e027e4f7670

📥 Commits

Reviewing files that changed from the base of the PR and between b50caf8 and 5ccc4e6.

📒 Files selected for processing (1)
  • Dockerfile.jetson

Shell comments between a backslash continuation and && break parsing.
Move the explanatory comment above the RUN command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant