Skip to content

fix(docker): align GLIBC versions and add mistralrs binary#1976

Open
glaziermag wants to merge 1 commit into
EricLBuehler:masterfrom
glaziermag:fix-1948-docker
Open

fix(docker): align GLIBC versions and add mistralrs binary#1976
glaziermag wants to merge 1 commit into
EricLBuehler:masterfrom
glaziermag:fix-1948-docker

Conversation

@glaziermag

@glaziermag glaziermag commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #1948 by replacing rust:latest with rust:1-bookworm so builder and runtime stages use compatible GLIBC baselines, and by copying the mistralrs CLI binary into the final image alongside the existing binaries.

Validation Result

Validation, 2026-05-14: ACTUAL, FEASIBLE_NOW.

Environment:

  • GPU validation environment
  • Docker 29.5.0, buildx 0.34.0
  • Rust on host: 1.95.0; image build uses Dockerfile toolchain

Base commit tested: 2d4ba4f16f61e5e18be085d0dd137bc95cba038a

DOCKER_BUILDKIT=1 docker build --progress=plain -t mistralrs-agent6-base-1976 .
docker run --rm --entrypoint /bin/sh mistralrs-agent6-base-1976 -lc '
  ls -l /usr/local/bin
  for b in mistralrs mistralrs-bench mistralrs-server mistralrs-web-chat; do
    command -v $b || true
    $b --help
  done
'

Base result: the image built, but /usr/local/bin contained only mistralrs-bench, mistralrs-server, and mistralrs-web-chat. mistralrs was missing (status=127), and the copied binaries failed with GLIBC_2.38 / GLIBC_2.39 not found.

PR head tested: 219f6d857128885d9f549b24d35c3bf487393433

DOCKER_BUILDKIT=1 docker build --progress=plain -t mistralrs-agent6-head-1976 .
docker run --rm --entrypoint /bin/sh mistralrs-agent6-head-1976 -lc '
  ls -l /usr/local/bin
  for b in mistralrs mistralrs-bench mistralrs-server mistralrs-web-chat; do
    command -v $b
    $b --help >/tmp/$b.help
  done
  wc -l /tmp/*.help
'

PR-head result: release workspace build completed, all four expected binaries existed in /usr/local/bin, and all four --help commands exited 0. mistralrs-web-chat printed its expected deprecation warning.

This is ACTUAL before/after validation of the missing-binary and GLIBC mismatch reported in #1948.

@github-actions

github-actions Bot commented Mar 10, 2026

Copy link
Copy Markdown
Code Metrics Report
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 Language              Files        Lines         Code     Comments       Blanks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 C Header                  5          305          210           52           43
 CSS                       3          281          252            5           24
 CUDA                     59        17661        13824         1637         2200
 Dockerfile                1           38           21            8            9
 HTML                      2           27           27            0            0
 JavaScript                3          392          387            2            3
 Jinja2                    7          694          656            5           33
 JSON                     25         9346         9343            0            3
 Makefile                  1            6            5            0            1
 MDX                       1          147            0          132           15
 Metal Shading Lan|       31        11647         9007         1064         1576
 PowerShell                1          300          227           30           43
 Python                  129         9969         8194          456         1319
 Shell                     2          489          331           96           62
 Plain Text                3         3723            0         2413         1310
 TOML                     27         1309         1145           36          128
 TypeScript               11         1607         1371           66          170
 YAML                      3           25           23            2            0
─────────────────────────────────────────────────────────────────────────────────
 Jupyter Notebooks         3          122           83           23           16
 |- Markdown               1           60           30           22            8
 |- Python                 1          122          113            1            8
 (Total)                              304          226           46           32
─────────────────────────────────────────────────────────────────────────────────
 Markdown                119         8232            0         5591         2641
 |- BASH                  52          491          432           34           25
 |- Dockerfile             2            5            5            0            0
 |- JSON                  16          582          582            0            0
 |- PowerShell             3            5            5            0            0
 |- Python                22          687          604            5           78
 |- Rust                  13          415          362            1           52
 |- TOML                   9          107           83            3           21
 |- YAML                   1            9            9            0            0
 (Total)                            10533         2082         5634         2817
─────────────────────────────────────────────────────────────────────────────────
 Rust                    571       245656       216375         6437        22844
 |- Markdown             379         9235          452         7653         1130
 (Total)                           254891       216827        14090        23974
─────────────────────────────────────────────────────────────────────────────────
 Svelte                   18         1831         1696           50           85
 |- CSS                    1            4            4            0            0
 |- JavaScript            18          876          727           24          125
 (Total)                             2711         2427           74          210
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 Total                  1025       326405       266585        25848        33972
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

@EricLBuehler EricLBuehler left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @glaziermag! Just 1 merge conflict it looks like.

@glaziermag

Copy link
Copy Markdown
Contributor Author

Resolved the merge conflict in .typos.toml. Everything looks good to go now!

@glaziermag

Copy link
Copy Markdown
Contributor Author

Closing: this PR has had CHANGES_REQUESTED from the maintainer (@EricLBuehler) for over 5 weeks with no response. The Dockerfile also has merge conflicts with main that would need to be resolved. If the GLIBC alignment issue is still relevant, a fresh PR against current main would be more productive.

@glaziermag glaziermag closed this Apr 16, 2026
@glaziermag

Copy link
Copy Markdown
Contributor Author

Reopening — the underlying Docker GLIBC issue is still valid. Will address the maintainer's review feedback and rebase against current main.

@glaziermag

Copy link
Copy Markdown
Contributor Author

Housekeeping note: This branch currently bundles the CI fix from #2115 (.typos.toml, openapi_doc.rs, distributed/layers.rs). Once #2115 is merged, this branch will need a rebase onto updated master to drop the duplicate CI fix commit and resolve the resulting conflicts.

@glaziermag

glaziermag commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

Wave 1 evidence bundle update:

PR: #1976
Linked issue: #1948
Base SHA: 2d4ba4f16f61e5e18be085d0dd137bc95cba038a
Current PR-head SHA: 219f6d857128885d9f549b24d35c3bf487393433
Fixed-head SHA, if changed: N/A

Exact commands recorded in the PR body:

DOCKER_BUILDKIT=1 docker build --progress=plain -t mistralrs-agent6-base-1976 .
docker run --rm --entrypoint /bin/sh mistralrs-agent6-base-1976 -lc '
  ls -l /usr/local/bin
  for b in mistralrs mistralrs-bench mistralrs-server mistralrs-web-chat; do
    command -v $b || true
    $b --help
  done
'

DOCKER_BUILDKIT=1 docker build --progress=plain -t mistralrs-agent6-head-1976 .
docker run --rm --entrypoint /bin/sh mistralrs-agent6-head-1976 -lc '
  ls -l /usr/local/bin
  for b in mistralrs mistralrs-bench mistralrs-server mistralrs-web-chat; do
    command -v $b
    $b --help >/tmp/$b.help
  done
  wc -l /tmp/*.help
'

Environment: GCP a2-highgpu-1g A100 host used as cloud host, Docker 29.5.0, buildx 0.34.0; GPU behavior is not material.
A100 category: A100_HOST_OPTIONAL.
Base result: image built, but mistralrs binary was missing and copied binaries failed with GLIBC_2.38 / GLIBC_2.39 not found.
Current PR-head result: release workspace build completed, all four expected binaries existed in /usr/local/bin, and all four --help commands exited 0.
Tests added/changed: Dockerfile GLIBC/toolchain alignment and final-image binary copy.
Tests passed: Docker build/run binary smoke per PR body.
Side-effect controls: validates image binary availability and GLIBC compatibility; no model/runtime GPU claim.
Raw logs/artifacts: PR body contains command list and before/after excerpts; no separate raw log file is attached in this comment.
Remaining risks: standalone raw Docker build logs are still useful if reviewers require downloadable artifacts.
Can say “Fixes #issue”: yes for #1948 missing-binary/GLIBC image behavior.
Safe wording: “Fixes #1948.”
Readiness status: ready-now if PR-body log excerpts are accepted; otherwise standalone raw Docker logs remain to attach.

@EricLBuehler

Copy link
Copy Markdown
Owner

Hey @glaziermag! PR looks nice - can you please resolve the remaining conflicts and then I can merge?

@glaziermag glaziermag force-pushed the fix-1948-docker branch 3 times, most recently from 806d426 to d2b662c Compare May 20, 2026 21:07
@glaziermag

glaziermag commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

@EricLBuehler Sorry for the noise here. I think the agent bungled this while trying to resolve the merge conflict, and I don’t want to waste your review time on a muddied branch.

If you happen to remember anything in the logic that would be a useful clue for another AI pass, I can possibly redo it cleanly from current master; otherwise I’ll drop it.

Apologies again for the churn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker: Missing mistralrs binary and libc dependencies in cpu-0.7 image

2 participants