Skip to content

Commit 37565fc

Browse files
committed
WIP
1 parent 9007800 commit 37565fc

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

Dockerfile-cuda

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ ARG SCCACHE_GHA_ENABLED
4545

4646
WORKDIR /usr/src
4747

48-
RUN if [ ${CUDA_COMPUTE_CAP} -ge 75 -a ${CUDA_COMPUTE_CAP} -lt 80 ]; \
48+
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
49+
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
50+
if [ ${CUDA_COMPUTE_CAP} -ge 75 -a ${CUDA_COMPUTE_CAP} -lt 80 ]; \
4951
then \
5052
nvprune --generate-code code=sm_${CUDA_COMPUTE_CAP} /usr/local/cuda/lib64/libcublas_static.a -o /usr/local/cuda/lib64/libcublas_static.a; \
5153
elif [ ${CUDA_COMPUTE_CAP} -ge 80 -a ${CUDA_COMPUTE_CAP} -lt 90 ]; \
@@ -60,7 +62,9 @@ RUN if [ ${CUDA_COMPUTE_CAP} -ge 75 -a ${CUDA_COMPUTE_CAP} -lt 80 ]; \
6062

6163
COPY --from=planner /usr/src/recipe.json recipe.json
6264

63-
RUN if [ ${CUDA_COMPUTE_CAP} -ge 75 -a ${CUDA_COMPUTE_CAP} -lt 80 ]; \
65+
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
66+
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
67+
if [ ${CUDA_COMPUTE_CAP} -ge 75 -a ${CUDA_COMPUTE_CAP} -lt 80 ]; \
6468
then \
6569
cargo chef cook --release --features candle-cuda-turing --features static-linking --no-default-features --recipe-path recipe.json && sccache -s; \
6670
else \

Dockerfile-cuda-all

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,28 +47,36 @@ WORKDIR /usr/src
4747

4848
COPY --from=planner /usr/src/recipe.json recipe.json
4949

50-
RUN if [ $VERTEX = "true" ]; \
50+
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
51+
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
52+
if [ $VERTEX = "true" ]; \
5153
then \
5254
cargo chef cook --release --features google --recipe-path recipe.json && sccache -s; \
5355
else \
5456
cargo chef cook --release --recipe-path recipe.json && sccache -s; \
5557
fi;
5658

57-
RUN if [ $VERTEX = "true" ]; \
59+
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
60+
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
61+
if [ $VERTEX = "true" ]; \
5862
then \
5963
CUDA_COMPUTE_CAP=75 cargo chef cook --release --features google --features candle-cuda-turing --recipe-path recipe.json && sccache -s; \
6064
else \
6165
CUDA_COMPUTE_CAP=75 cargo chef cook --release --features candle-cuda-turing --recipe-path recipe.json && sccache -s; \
6266
fi;
6367

64-
RUN if [ $VERTEX = "true" ]; \
68+
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
69+
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
70+
if [ $VERTEX = "true" ]; \
6571
then \
6672
CUDA_COMPUTE_CAP=80 cargo chef cook --release --features google --features candle-cuda --recipe-path recipe.json && sccache -s; \
6773
else \
6874
CUDA_COMPUTE_CAP=80 cargo chef cook --release --features candle-cuda --recipe-path recipe.json && sccache -s; \
6975
fi;
7076

71-
RUN if [ $VERTEX = "true" ]; \
77+
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
78+
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
79+
if [ $VERTEX = "true" ]; \
7280
then \
7381
CUDA_COMPUTE_CAP=90 cargo chef cook --release --features google --features candle-cuda --recipe-path recipe.json && sccache -s; \
7482
else \

Dockerfile-intel

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ ARG SCCACHE_GHA_ENABLED
2828

2929
COPY --from=planner /usr/src/recipe.json recipe.json
3030

31-
RUN cargo chef cook --release --features python --no-default-features --recipe-path recipe.json && sccache -s
31+
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
32+
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
33+
cargo chef cook --release --features python --no-default-features --recipe-path recipe.json && sccache -s
3234

3335
COPY backends backends
3436
COPY core core

0 commit comments

Comments
 (0)