@@ -35,7 +35,6 @@ FROM base-builder AS builder
3535
3636ARG GIT_SHA
3737ARG DOCKER_LABEL
38- ARG VERTEX="false"
3938
4039# sccache specific variables
4140ARG SCCACHE_GHA_ENABLED
@@ -51,39 +50,19 @@ COPY --from=planner /usr/src/recipe.json recipe.json
5150
5251RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
5352 --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
54- if [ $VERTEX = "true" ]; \
55- then \
56- cargo chef cook --release --features google --recipe-path recipe.json && sccache -s; \
57- else \
58- cargo chef cook --release --recipe-path recipe.json && sccache -s; \
59- fi;
53+ cargo chef cook --release --recipe-path recipe.json && sccache -s;
6054
6155RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
6256 --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
63- if [ $VERTEX = "true" ]; \
64- then \
65- CUDA_COMPUTE_CAP=75 cargo chef cook --release --features google --features candle-cuda-turing --recipe-path recipe.json && sccache -s; \
66- else \
67- CUDA_COMPUTE_CAP=75 cargo chef cook --release --features candle-cuda-turing --recipe-path recipe.json && sccache -s; \
68- fi;
57+ CUDA_COMPUTE_CAP=75 cargo chef cook --release --features candle-cuda-turing --recipe-path recipe.json && sccache -s;
6958
7059RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
7160 --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
72- if [ $VERTEX = "true" ]; \
73- then \
74- CUDA_COMPUTE_CAP=80 cargo chef cook --release --features google --features candle-cuda --recipe-path recipe.json && sccache -s; \
75- else \
76- CUDA_COMPUTE_CAP=80 cargo chef cook --release --features candle-cuda --recipe-path recipe.json && sccache -s; \
77- fi;
61+ CUDA_COMPUTE_CAP=80 cargo chef cook --release --features candle-cuda --recipe-path recipe.json && sccache -s;
7862
7963RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
8064 --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
81- if [ $VERTEX = "true" ]; \
82- then \
83- CUDA_COMPUTE_CAP=90 cargo chef cook --release --features google --features candle-cuda --recipe-path recipe.json && sccache -s; \
84- else \
85- CUDA_COMPUTE_CAP=90 cargo chef cook --release --features candle-cuda --recipe-path recipe.json && sccache -s; \
86- fi;
65+ CUDA_COMPUTE_CAP=90 cargo chef cook --release --features candle-cuda --recipe-path recipe.json && sccache -s;
8766
8867COPY backends backends
8968COPY core core
@@ -93,34 +72,19 @@ COPY Cargo.lock ./
9372
9473RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
9574 --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
96- if [ $VERTEX = "true" ]; \
97- then \
98- CUDA_COMPUTE_CAP=75 cargo build --release --bin text-embeddings-router -F candle-cuda-turing -F google && sccache -s; \
99- else \
100- CUDA_COMPUTE_CAP=75 cargo build --release --bin text-embeddings-router -F candle-cuda-turing && sccache -s; \
101- fi;
75+ CUDA_COMPUTE_CAP=75 cargo build --release --bin text-embeddings-router -F candle-cuda-turing && sccache -s;
10276
10377RUN mv /usr/src/target/release/text-embeddings-router /usr/src/target/release/text-embeddings-router-75
10478
10579RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
10680 --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
107- if [ $VERTEX = "true" ]; \
108- then \
109- CUDA_COMPUTE_CAP=80 cargo build --release --bin text-embeddings-router -F candle-cuda -F google && sccache -s; \
110- else \
111- CUDA_COMPUTE_CAP=80 cargo build --release --bin text-embeddings-router -F candle-cuda && sccache -s; \
112- fi;
81+ CUDA_COMPUTE_CAP=80 cargo build --release --bin text-embeddings-router -F candle-cuda && sccache -s;
11382
11483RUN mv /usr/src/target/release/text-embeddings-router /usr/src/target/release/text-embeddings-router-80
11584
11685RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
11786 --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
118- if [ $VERTEX = "true" ]; \
119- then \
120- CUDA_COMPUTE_CAP=90 cargo build --release --bin text-embeddings-router -F candle-cuda -F google && sccache -s; \
121- else \
122- CUDA_COMPUTE_CAP=90 cargo build --release --bin text-embeddings-router -F candle-cuda && sccache -s; \
123- fi;
87+ CUDA_COMPUTE_CAP=90 cargo build --release --bin text-embeddings-router -F candle-cuda && sccache -s;
12488
12589RUN mv /usr/src/target/release/text-embeddings-router /usr/src/target/release/text-embeddings-router-90
12690
@@ -142,16 +106,6 @@ COPY --from=builder /usr/src/target/release/text-embeddings-router-75 /usr/local
142106COPY --from=builder /usr/src/target/release/text-embeddings-router-80 /usr/local/bin/text-embeddings-router-80
143107COPY --from=builder /usr/src/target/release/text-embeddings-router-90 /usr/local/bin/text-embeddings-router-90
144108
145- # Amazon SageMaker compatible image
146- FROM base AS sagemaker
147-
148- COPY --chmod=775 sagemaker-entrypoint-cuda-all.sh entrypoint.sh
149-
150- ENTRYPOINT ["./entrypoint.sh"]
151-
152- # Default image
153- FROM base
154-
155109COPY --chmod=775 cuda-all-entrypoint.sh entrypoint.sh
156110
157111ENTRYPOINT ["./entrypoint.sh"]
0 commit comments