Fix Docker build: resolve Julia sys.so not found in install_rms.sh#910
Open
alongd wants to merge 1 commit into
Open
Fix Docker build: resolve Julia sys.so not found in install_rms.sh#910alongd wants to merge 1 commit into
alongd wants to merge 1 commit into
Conversation
`~/.juliaup/bin/julia` is the juliaup launcher, not the real Julia binary.
When install_rms.sh sets PYTHON_JULIAPKG_EXE=$(which julia), pyjuliacall
receives the launcher path and derives sys.so relative to it, yielding a
non-existent `~/.juliaup/bin/../lib/julia/sys.so` and failing the build:
ERROR: could not load library ".../.juliaup/bin/../lib/julia/sys.so"
Prepend the real Julia BINDIR (obtained by running `julia -e "print(Sys.BINDIR)"`
through the launcher) to PATH so `which julia` inside install_rms.sh resolves
to the actual binary. Single-quote the inner `bash -c` so the `$(...)` is
evaluated inside the activated rmg_env, not by the outer shell.
Restores the previously-proposed fix from #901 (closed without merging). Its CI
log confirmed this step then reached `[ Info: RMS loaded successfully!`; the
follow-on setuptools blocker it exposed is already resolved on main (#904).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #910 +/- ##
==========================================
- Coverage 63.16% 63.07% -0.10%
==========================================
Files 114 114
Lines 38177 38177
Branches 9990 9990
==========================================
- Hits 24114 24079 -35
- Misses 11181 11204 +23
- Partials 2882 2894 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the ARC Docker image build failure in the builder stage by ensuring the Julia executable resolved inside rmg_env is the real Julia binary (from juliaup’s depot) rather than the juliaup launcher, preventing pyjuliacall from deriving an invalid sys.so path.
Changes:
- Switch the
micromamba run ... bash -cinvocation to single quotes so$(...)is evaluated afterrmg_envactivation. - Prepend
$(julia -e "print(Sys.BINDIR)")toPATHbefore sourcinginstall_rms.sh, sowhich juliaresolves to the actual Julia binary. - Add explanatory Dockerfile comments documenting the root cause and rationale.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # binary. Single quotes keep `$(...)` from being evaluated by the outer shell before micromamba | ||
| # activates rmg_env, so `julia` resolves inside the environment. | ||
| RUN micromamba run -n rmg_env bash -c '\ | ||
| export PATH=$(julia -e "print(Sys.BINDIR)"):$PATH && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The
Docker Image Build and Pushworkflow has been red on everypush/pull_requestrun since ~2026-06-10 (last green real build: 2026-06-04). Scheduled runs are green only because on ascheduleevent neither build step'sif:condition matches, so no image is actually built.The build fails in the
builderstage atinstall_rms.sh:This is not related to PR #907 (Dependabot action bumps) — it reproduces on
mainindependently.Root cause
~/.juliaup/bin/juliais the juliaup launcher, not the real Julia binary.install_rms.shsetsPYTHON_JULIAPKG_EXE=$(which julia), so pyjuliacall receives the launcher path and derivessys.sorelative to it —~/.juliaup/bin/../lib/julia/sys.so, which does not exist. The real Julia binary (and itssys.so) lives under the juliaup depot, reported bySys.BINDIR.Fix
Prepend the real Julia
BINDIR(resolved by runningjulia -e "print(Sys.BINDIR)"through the launcher) toPATHbefore sourcinginstall_rms.sh, sowhich juliaresolves to the actual binary. The innerbash -cis single-quoted so the$(...)is evaluated inside the activatedrmg_env, not by the outer shell beforemicromamba runactivates it.Provenance / why this will work
This restores the fix originally proposed in #901, which was closed without merging (the closing comment conflated it with an
actions/checkoutbump). #901's own CI log proves the fix reaches[ Info: RMS loaded successfully!past this step. The second blocker that #901's log then exposed —ModuleNotFoundError: No module named 'setuptools'inmake compile— is already resolved onmainvia #904 (setuptoolsis present inenvironment.yml). With both fixes in place, the build should complete.Verification is via this PR's Docker build check (the full image build can't be run locally against the RMG toolchain).
🤖 Generated with Claude Code