Skip to content

Commit 13fed09

Browse files
committed
Use different package caches for multiplatform builds
The build mixed the cache between architectures. This can potentially fail the build or produce invalid image.
1 parent 7e261ae commit 13fed09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ FROM ${TORCHVISION_WHEEL_SOURCE} AS torchvision-wheel-image
1818
FROM python:${PYTHON}
1919

2020
ARG TARGETPLATFORM
21-
RUN --mount=type=cache,target=/var/cache/apt,id=bookworm-/var/cache/apt \
22-
--mount=type=cache,target=/var/lib/apt,sharing=locked,id=bookworm-/var/lib/apt \
21+
RUN --mount=type=cache,target=/var/cache/apt,id=bookworm-/var/cache/apt-${TARGETPLATFORM} \
22+
--mount=type=cache,target=/var/lib/apt,sharing=locked,id=bookworm-/var/lib/apt-${TARGETPLATFORM} \
2323
<<NUR
2424
set -ex
2525
# To keep cache of downloaded .debs, replace docker configuration

0 commit comments

Comments
 (0)