@@ -33,6 +33,7 @@ FROM base-builder AS builder
33
33
34
34
ARG GIT_SHA
35
35
ARG DOCKER_LABEL
36
+ ARG VERTEX
36
37
37
38
# sccache specific variables
38
39
ARG ACTIONS_CACHE_URL
@@ -45,39 +46,69 @@ COPY --from=planner /usr/src/recipe.json recipe.json
45
46
46
47
FROM builder as builder-75
47
48
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;
49
55
50
56
COPY backends backends
51
57
COPY core core
52
58
COPY router router
53
59
COPY Cargo.toml ./
54
60
COPY Cargo.lock ./
55
61
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;
57
68
58
69
FROM builder as builder-80
59
70
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;
61
77
62
78
COPY backends backends
63
79
COPY core core
64
80
COPY router router
65
81
COPY Cargo.toml ./
66
82
COPY Cargo.lock ./
67
83
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;
69
90
70
91
FROM builder as builder-90
71
92
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;
73
99
74
100
COPY backends backends
75
101
COPY core core
76
102
COPY router router
77
103
COPY Cargo.toml ./
78
104
COPY Cargo.lock ./
79
105
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;
81
112
82
113
FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04 as base
83
114
0 commit comments