@@ -33,6 +33,7 @@ FROM base-builder AS builder
3333
3434ARG GIT_SHA
3535ARG DOCKER_LABEL
36+ ARG VERTEX
3637
3738# sccache specific variables
3839ARG ACTIONS_CACHE_URL
@@ -45,39 +46,69 @@ COPY --from=planner /usr/src/recipe.json recipe.json
4546
4647FROM builder as builder-75
4748
48- RUN CUDA_COMPUTE_CAP=75 cargo chef cook --release --features candle-cuda-turing --no-default-features --recipe-path recipe.json && sccache -s
49+ RUN if [ $VERTEX = "true" ]; \
50+ then \
51+ CUDA_COMPUTE_CAP=75 cargo chef cook --release --features google --features candle-cuda-turing --no-default-features --recipe-path recipe.json && sccache -s; \
52+ else \
53+ CUDA_COMPUTE_CAP=75 cargo chef cook --release --features candle-cuda-turing --no-default-features --recipe-path recipe.json && sccache -s; \
54+ fi;
4955
5056COPY backends backends
5157COPY core core
5258COPY router router
5359COPY Cargo.toml ./
5460COPY Cargo.lock ./
5561
56- RUN CUDA_COMPUTE_CAP=75 cargo build --release --bin text-embeddings-router -F candle-cuda-turing -F http --no-default-features && sccache -s
62+ RUN if [ $VERTEX = "true" ]; \
63+ then \
64+ CUDA_COMPUTE_CAP=75 cargo build --release --bin text-embeddings-router -F candle-cuda-turing -F http -F google --no-default-features && sccache -s; \
65+ else \
66+ CUDA_COMPUTE_CAP=75 cargo build --release --bin text-embeddings-router -F candle-cuda-turing -F http --no-default-features && sccache -s; \
67+ fi;
5768
5869FROM builder as builder-80
5970
60- RUN CUDA_COMPUTE_CAP=80 cargo chef cook --release --features candle-cuda --no-default-features --recipe-path recipe.json && sccache -s
71+ RUN if [ $VERTEX = "true" ]; \
72+ then \
73+ CUDA_COMPUTE_CAP=80 cargo chef cook --release --features google --features candle-cuda-turing --no-default-features --recipe-path recipe.json && sccache -s; \
74+ else \
75+ CUDA_COMPUTE_CAP=80 cargo chef cook --release --features candle-cuda-turing --no-default-features --recipe-path recipe.json && sccache -s; \
76+ fi;
6177
6278COPY backends backends
6379COPY core core
6480COPY router router
6581COPY Cargo.toml ./
6682COPY Cargo.lock ./
6783
68- RUN CUDA_COMPUTE_CAP=80 cargo build --release --bin text-embeddings-router -F candle-cuda -F http --no-default-features && sccache -s
84+ RUN if [ $VERTEX = "true" ]; \
85+ then \
86+ CUDA_COMPUTE_CAP=80 cargo build --release --bin text-embeddings-router -F candle-cuda-turing -F http -F google --no-default-features && sccache -s; \
87+ else \
88+ CUDA_COMPUTE_CAP=80 cargo build --release --bin text-embeddings-router -F candle-cuda-turing -F http --no-default-features && sccache -s; \
89+ fi;
6990
7091FROM builder as builder-90
7192
72- RUN CUDA_COMPUTE_CAP=90 cargo chef cook --release --features candle-cuda --no-default-features --recipe-path recipe.json && sccache -s
93+ RUN if [ $VERTEX = "true" ]; \
94+ then \
95+ CUDA_COMPUTE_CAP=90 cargo chef cook --release --features google --features candle-cuda-turing --no-default-features --recipe-path recipe.json && sccache -s; \
96+ else \
97+ CUDA_COMPUTE_CAP=90 cargo chef cook --release --features candle-cuda-turing --no-default-features --recipe-path recipe.json && sccache -s; \
98+ fi;
7399
74100COPY backends backends
75101COPY core core
76102COPY router router
77103COPY Cargo.toml ./
78104COPY Cargo.lock ./
79105
80- RUN CUDA_COMPUTE_CAP=90 cargo build --release --bin text-embeddings-router -F candle-cuda -F http --no-default-features && sccache -s
106+ RUN if [ $VERTEX = "true" ]; \
107+ then \
108+ CUDA_COMPUTE_CAP=90 cargo build --release --bin text-embeddings-router -F candle-cuda-turing -F http -F google --no-default-features && sccache -s; \
109+ else \
110+ CUDA_COMPUTE_CAP=90 cargo build --release --bin text-embeddings-router -F candle-cuda-turing -F http --no-default-features && sccache -s; \
111+ fi;
81112
82113FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04 as base
83114
0 commit comments