Fix(cpu/docker): install Rust for appuser, set PATH, and increase uv timeouts to stabilize build #383
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes intermittent CPU image build failures by ensuring Rust is available to the non-root user during dependency installation and by increasing network timeouts for large wheels. It stabilizes
uv syncon Apple Silicon and similar arm64 environments.What changed
appuser(so Rust is on PATH duringuv sync)./home/appuser/.cargo/binand/app/.venv/binbefore dependency installation.UV_HTTP_TIMEOUT=120andUV_HTTP_RETRIES=3to reduce transient network timeouts when fetching large wheels (e.g., numpy, torch).No runtime behavior change; only build reliability improvements.
Why
sudachipy(pulled viapyopenjtalk-plus→misaki[ja]) requires a Rust compiler to build on arm64. Whenuv syncruns underappuser, Rust wasn’t available on PATH, causing:How I tested
docker compose up --buildindocker/cpuuv synccompleted without Rust or numpy timeouts.Risk/impact
Notes for reviewers
appuseris necessary becauseuv syncruns as that user; installing only as root leaves Rust off PATH forappuser.Checklist
docker compose up --build.Related
sudachipybuild.