Skip to content

Commit 9bec084

Browse files
authored
Pin cargo-chef version on TEI DLCs on GPU (#140)
* Pin `cargo-chef` to 0.1.62 * Rename "TGI" to "TEI" when applicable
1 parent 0232c42 commit 9bec084

File tree

7 files changed

+20
-12
lines changed

7 files changed

+20
-12
lines changed

containers/tei/cpu/1.2.2/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Fetch and extract the TGI sources
1+
# Fetch and extract the TEI sources
22
FROM alpine AS tei
33
RUN mkdir -p /tei
44
ADD https://github.com/huggingface/text-embeddings-inference/archive/refs/tags/v1.2.2.tar.gz /tei/sources.tar.gz

containers/tei/cpu/1.4.0/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Fetch and extract the TGI sources
1+
# Fetch and extract the TEI sources
22
FROM alpine AS tei
33

44
RUN mkdir -p /tei

containers/tei/cpu/1.5.1/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Fetch and extract the TGI sources
1+
# Fetch and extract the TEI sources
22
FROM alpine AS tei
33

44
RUN mkdir -p /tei

containers/tei/gpu/1.2.2/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Fetch and extract the TGI sources
1+
# Fetch and extract the TEI sources
22
FROM alpine AS tei
33
RUN mkdir -p /tei
44
ADD https://github.com/huggingface/text-embeddings-inference/archive/refs/tags/v1.2.2.tar.gz /tei/sources.tar.gz
@@ -10,19 +10,21 @@ FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS base-builder
1010
ENV SCCACHE=0.5.4
1111
ENV RUSTC_WRAPPER=/usr/local/bin/sccache
1212
ENV PATH="/root/.cargo/bin:${PATH}"
13+
# aligned with `cargo-chef` version in `lukemathwalker/cargo-chef:latest-rust-1.75-bookworm`
14+
ENV CARGO_CHEF=0.1.62
1315

1416
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
1517
curl \
1618
libssl-dev \
1719
pkg-config \
1820
&& rm -rf /var/lib/apt/lists/*
1921

20-
# Download and configure sccache
22+
# Donwload and configure sccache
2123
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v$SCCACHE/sccache-v$SCCACHE-x86_64-unknown-linux-musl.tar.gz | tar -xzv --strip-components=1 -C /usr/local/bin sccache-v$SCCACHE-x86_64-unknown-linux-musl/sccache && \
2224
chmod +x /usr/local/bin/sccache
2325

2426
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
25-
RUN cargo install cargo-chef --locked
27+
RUN cargo install cargo-chef --version $CARGO_CHEF --locked
2628

2729
FROM base-builder AS planner
2830

containers/tei/gpu/1.4.0/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Fetch and extract the TGI sources
1+
# Fetch and extract the TEI sources
22
FROM alpine AS tei
33

44
RUN mkdir -p /tei
@@ -11,19 +11,21 @@ FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS base-builder
1111
ENV SCCACHE=0.5.4
1212
ENV RUSTC_WRAPPER=/usr/local/bin/sccache
1313
ENV PATH="/root/.cargo/bin:${PATH}"
14+
# aligned with `cargo-chef` version in `lukemathwalker/cargo-chef:latest-rust-1.75-bookworm`
15+
ENV CARGO_CHEF=0.1.62
1416

1517
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
1618
curl \
1719
libssl-dev \
1820
pkg-config \
1921
&& rm -rf /var/lib/apt/lists/*
2022

21-
# Download and configure sccache
23+
# Donwload and configure sccache
2224
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v$SCCACHE/sccache-v$SCCACHE-x86_64-unknown-linux-musl.tar.gz | tar -xzv --strip-components=1 -C /usr/local/bin sccache-v$SCCACHE-x86_64-unknown-linux-musl/sccache && \
2325
chmod +x /usr/local/bin/sccache
2426

2527
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
26-
RUN cargo install cargo-chef --locked
28+
RUN cargo install cargo-chef --version $CARGO_CHEF --locked
2729

2830
FROM base-builder AS planner
2931

containers/tei/gpu/1.5.1/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Fetch and extract the TGI sources
1+
# Fetch and extract the TEI sources
22
FROM alpine AS tei
33

44
RUN mkdir -p /tei
@@ -11,6 +11,8 @@ FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS base-builder
1111
ENV SCCACHE=0.5.4
1212
ENV RUSTC_WRAPPER=/usr/local/bin/sccache
1313
ENV PATH="/root/.cargo/bin:${PATH}"
14+
# aligned with `cargo-chef` version in `lukemathwalker/cargo-chef:latest-rust-1.75-bookworm`
15+
ENV CARGO_CHEF=0.1.62
1416

1517
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
1618
curl \
@@ -23,7 +25,7 @@ RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v$SCCACHE/sc
2325
chmod +x /usr/local/bin/sccache
2426

2527
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
26-
RUN cargo install cargo-chef --locked
28+
RUN cargo install cargo-chef --version $CARGO_CHEF --locked
2729

2830
FROM base-builder AS planner
2931

containers/tei/gpu/1.6.0/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS base-builder
1111
ENV SCCACHE=0.5.4
1212
ENV RUSTC_WRAPPER=/usr/local/bin/sccache
1313
ENV PATH="/root/.cargo/bin:${PATH}"
14+
# aligned with `cargo-chef` version in `lukemathwalker/cargo-chef:latest-rust-1.75-bookworm`
15+
ENV CARGO_CHEF=0.1.62
1416

1517
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
1618
curl \
@@ -23,7 +25,7 @@ RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v$SCCACHE/sc
2325
chmod +x /usr/local/bin/sccache
2426

2527
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
26-
RUN cargo install cargo-chef --locked
28+
RUN cargo install cargo-chef --version $CARGO_CHEF --locked
2729

2830
FROM base-builder AS planner
2931

0 commit comments

Comments
 (0)