Skip to content

Commit f242499

Browse files
dvystrcilclaude
andcommitted
fix: pin Rust to 1.72.0 — tokenizers 0.13.x incompatible with modern Rust
Rust 1.87 (stable) rejects lifetime syntax in tokenizers 0.13.x lib code that was valid in 2023-era compilers. Pin to 1.72.0 which is the toolchain era when tokenizers 0.13.x was actively maintained and its Cargo.lock dependency tree was written for. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0abb8c9 commit f242499

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ RUN git clone --depth 1 --branch ${STABLE_DIFFUSION_TAG} \
1212
FROM harbor-core.harbor.svc.cluster.local/dockerhub-proxy/rocm/pytorch:rocm7.0.2_ubuntu24.04_py3.12_pytorch_release_2.8.0
1313
ARG ORAS_VERSION
1414

15-
# Rust (via rustup stable) is required by the tokenizers package which has no
16-
# cp312 wheel for the version pinned in requirements_versions.txt.
17-
# Installed to /usr/local so user 1000 in the init container can use cargo.
15+
# Rust is required by tokenizers which has no cp312 wheel for the version
16+
# pinned by transformers==4.30.2 in requirements_versions.txt.
17+
# Pin to 1.72.0 — the era when tokenizers 0.13.x was maintained;
18+
# modern Rust (1.87+) rejects the old lifetime syntax in the tokenizers lib.
1819
ENV RUSTUP_HOME=/usr/local/rustup \
1920
CARGO_HOME=/usr/local/cargo \
2021
PATH=/usr/local/cargo/bin:$PATH
@@ -24,7 +25,7 @@ RUN apt-get update && \
2425
libgl1 wget git curl libtcmalloc-minimal4 python3.12-venv bc libssl-dev pkg-config \
2526
&& rm -rf /var/lib/apt/lists/* \
2627
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
27-
sh -s -- -y --default-toolchain stable --no-modify-path \
28+
sh -s -- -y --default-toolchain 1.72.0 --no-modify-path \
2829
&& chmod -R a+rwx /usr/local/rustup /usr/local/cargo \
2930
&& curl -sL "https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_amd64.tar.gz" \
3031
| tar -xz -C /usr/local/bin oras

0 commit comments

Comments
 (0)