-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: docker image failed to boot on arm64 node #2122
Conversation
65c9487
to
42cb94e
Compare
# Create dummy main.rs files for each workspace member to be able to compile all the dependencies | ||
RUN find . -type d -name "meilisearch-*" | xargs -I{} sh -c 'mkdir {}/src; echo "fn main() { }" > {}/src/main.rs;' | ||
# Use `cargo build` instead of `cargo vendor` because we need to not only download but compile dependencies too | ||
RUN $HOME/.cargo/bin/cargo build --release | ||
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ | ||
export JEMALLOC_SYS_WITH_LG_PAGE=16; \ | ||
fi && \ | ||
$HOME/.cargo/bin/cargo build --release | ||
# Cleanup dummy main.rs files | ||
RUN find . -path "*/src/main.rs" -delete | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @curquiza, I tested it successfully on arm64 machine. But compiling the image is just too slow 😂.
BTW, can we remove the cargo build
above? It does not seem necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum, I would rather remove this line in another PR to ensure we do not any mistake by introducing JEMALLOC_SYS_LG_PAGE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Thearas
bors merge
Pull Request
What does this PR do?
Fixes #2115.
PR checklist
Please check if your PR fulfills the following requirements: