Skip to content
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

Merged
merged 3 commits into from
Feb 14, 2022

Conversation

Thearas
Copy link
Contributor

@Thearas Thearas commented Jan 28, 2022

Pull Request

What does this PR do?

Fixes #2115.

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

@Thearas Thearas force-pushed the fix-image-arm64 branch 3 times, most recently from 65c9487 to 42cb94e Compare February 14, 2022 07:01
@Thearas Thearas marked this pull request as ready for review February 14, 2022 07:10
Dockerfile Outdated Show resolved Hide resolved
@curquiza curquiza self-requested a review February 14, 2022 09:44
@curquiza curquiza added this to the v0.26.0 milestone Feb 14, 2022
@Thearas Thearas changed the title fix: docker image failed to boot on arm64 node [WIP] fix: docker image failed to boot on arm64 node Feb 14, 2022
Comment on lines 21 to 30
# 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

Copy link
Contributor Author

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.

Copy link
Member

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

@Thearas Thearas changed the title [WIP] fix: docker image failed to boot on arm64 node fix: docker image failed to boot on arm64 node Feb 14, 2022
Copy link
Member

@curquiza curquiza left a 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

@bors
Copy link
Contributor

bors bot commented Feb 14, 2022

@bors bors bot merged commit 216965e into meilisearch:main Feb 14, 2022
@Thearas Thearas deleted the fix-image-arm64 branch February 14, 2022 12:34
@curquiza curquiza added the v0.26.0 PRs/issues solved in v0.26.0 label Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v0.26.0 PRs/issues solved in v0.26.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deploy Meilisearch v0.25.2 on K8s arm64 node failed
2 participants