fix(docker): support RPi CM4 compatibility by parameterizing platform#7340
fix(docker): support RPi CM4 compatibility by parameterizing platform#7340namdamdoi68-oss wants to merge 5 commits into
Conversation
|
👋 Review summary What looks good
Overall Minor: Inline comments: 2 blockers. 🤖 Review posted via /review-github-pr |
…eterizing remaining services
…ipt for RPi compatibility
|
Hello @andrescrz, I have addressed all the review feedback:
Please let me know if there's anything else needed! |
andrescrz
left a comment
There was a problem hiding this comment.
Thanks a lot for taking the time to work on this and submit a contribution—we really appreciate the effort and your interest in improving the project.
I left some feedback on both the overall approach and the implementation details.
At a high level, this change provides a workaround, but we're not convinced it will deliver the experience we want on lower-end devices such as the Raspberry Pi 4 / Compute Module 4, where it relies on running amd64 Docker images.
Before introducing this, we'd want to verify that the approach consistently provides an acceptable level of quality. We'd rather not support Opik on these devices yet than offer an experience that doesn't meet expectations.
More broadly, this is a workaround rather than a solution to the underlying issue, so we'd prefer to keep the issue open for now regardless of this PR.
Regarding the implementation itself, we're hesitant to introduce configurable Docker platform resolution. In general, we prefer to rely on Docker's automatic platform resolution, as it reduces the risk of user misconfiguration. We'd only consider exposing this as a configuration option if the benefits clearly outweigh the additional complexity and potential for incorrect setups.
Finally, could you provide some evidence that this approach works reliably in practice? For example, a short video demonstrating Opik running successfully on the target devices would be very helpful in evaluating the proposal.
Thanks again for the contribution and for engaging with the project. Even if we decide not to move forward with this particular approach, we'd be happy to review future contributions that address the underlying issue in a different way.
There was a problem hiding this comment.
Please do not commit all these MD files, they don't belong to Opik code base.
| " | ||
| clickhouse: | ||
| image: clickhouse/clickhouse-server:25.8.16.34-alpine | ||
| platform: ${OPIK_CLICKHOUSE_PLATFORM:-} |
There was a problem hiding this comment.
For architectural reasons, we aren't completely sure if we want to allow overriding the platform, instead of allowing docker to automatically determine and pull/use the right images.
This introduces an extra layer of complexity (users might override the env vars, forget to unset them and report unnecessary issues/bugs), unless there's a reason that makes this worthy.
For this particular case, I don't think this approach completely meets the goal of allowing Opik running in RPi CM4, as emulation seems more like a workaround than an actual fix.
We need to evaluate if the workaround is worthy introducing this.
| ```bash | ||
| docker run --privileged --rm tonistiigi/binfmt --install amd64 | ||
| ``` |
There was a problem hiding this comment.
This emulation workaround suggest 3rd party components from our official documentation. We will need to evaluate if this is worthy the benefit.
There was a problem hiding this comment.
This shouldn't be included in the code base.
Summary
This PR resolves issue #2101 where running the default Docker compose setup crashes on older ARMv8-A hardware (such as Raspberry Pi 4 or Raspberry Pi CM4) because ClickHouse and backend images require
ARMv8.2-Ainstruction set.Solution
Instead of hardcoding any platforms or custom Dockerfiles, this PR parameterizes the
platformoption underclickhouse,backend, andpython-backendservices insidedocker-compose.yaml.""(native architecture), ensuring zero disruption and 100% native performance for existing x86_64, standard arm64, and Apple Silicon users.Closes #2101