Skip to content

Commit

Permalink
Pin cargo-chef version on TEI DLCs on GPU (#140)
Browse files Browse the repository at this point in the history
* Pin `cargo-chef` to 0.1.62

* Rename "TGI" to "TEI" when applicable
  • Loading branch information
alvarobartt authored Jan 13, 2025
1 parent 0232c42 commit 9bec084
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion containers/tei/cpu/1.2.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Fetch and extract the TGI sources
# Fetch and extract the TEI sources
FROM alpine AS tei
RUN mkdir -p /tei
ADD https://github.com/huggingface/text-embeddings-inference/archive/refs/tags/v1.2.2.tar.gz /tei/sources.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion containers/tei/cpu/1.4.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Fetch and extract the TGI sources
# Fetch and extract the TEI sources
FROM alpine AS tei

RUN mkdir -p /tei
Expand Down
2 changes: 1 addition & 1 deletion containers/tei/cpu/1.5.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Fetch and extract the TGI sources
# Fetch and extract the TEI sources
FROM alpine AS tei

RUN mkdir -p /tei
Expand Down
8 changes: 5 additions & 3 deletions containers/tei/gpu/1.2.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Fetch and extract the TGI sources
# Fetch and extract the TEI sources
FROM alpine AS tei
RUN mkdir -p /tei
ADD https://github.com/huggingface/text-embeddings-inference/archive/refs/tags/v1.2.2.tar.gz /tei/sources.tar.gz
Expand All @@ -10,19 +10,21 @@ FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS base-builder
ENV SCCACHE=0.5.4
ENV RUSTC_WRAPPER=/usr/local/bin/sccache
ENV PATH="/root/.cargo/bin:${PATH}"
# aligned with `cargo-chef` version in `lukemathwalker/cargo-chef:latest-rust-1.75-bookworm`
ENV CARGO_CHEF=0.1.62

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

# Download and configure sccache
# Donwload and configure sccache
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 && \
chmod +x /usr/local/bin/sccache

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

FROM base-builder AS planner

Expand Down
8 changes: 5 additions & 3 deletions containers/tei/gpu/1.4.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Fetch and extract the TGI sources
# Fetch and extract the TEI sources
FROM alpine AS tei

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

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

# Download and configure sccache
# Donwload and configure sccache
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 && \
chmod +x /usr/local/bin/sccache

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

FROM base-builder AS planner

Expand Down
6 changes: 4 additions & 2 deletions containers/tei/gpu/1.5.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Fetch and extract the TGI sources
# Fetch and extract the TEI sources
FROM alpine AS tei

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

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

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

FROM base-builder AS planner

Expand Down
4 changes: 3 additions & 1 deletion containers/tei/gpu/1.6.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS base-builder
ENV SCCACHE=0.5.4
ENV RUSTC_WRAPPER=/usr/local/bin/sccache
ENV PATH="/root/.cargo/bin:${PATH}"
# aligned with `cargo-chef` version in `lukemathwalker/cargo-chef:latest-rust-1.75-bookworm`
ENV CARGO_CHEF=0.1.62

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

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

FROM base-builder AS planner

Expand Down

0 comments on commit 9bec084

Please sign in to comment.