Skip to content

Commit 31156f7

Browse files
committed
[DOP-30579] Improve ivy2 package caching
1 parent 091f548 commit 31156f7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docker/Dockerfile.worker

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ FROM builder AS ivy2_packages
4545

4646
RUN --mount=type=bind,source=./syncmaster/worker/ivy2.py,target=/app/syncmaster/worker/ivy2.py \
4747
--mount=type=bind,source=./docker/download_ivy2_packages.py,target=/app/docker/download_ivy2_packages.py \
48-
--mount=type=cache,target=/root/.ivy2 \
48+
--mount=type=cache,target=/root/.ivy2/ \
4949
# Try to download all dependencies at once.
5050
# If multiple packages depends on the same transitive dependency, Spark uses maximum version of this dependency.
5151
python /app/docker/download_ivy2_packages.py all && \
@@ -58,7 +58,7 @@ RUN --mount=type=bind,source=./syncmaster/worker/ivy2.py,target=/app/syncmaster/
5858
python /app/docker/download_ivy2_packages.py oracle && \
5959
python /app/docker/download_ivy2_packages.py mssql && \
6060
python /app/docker/download_ivy2_packages.py mysql && \
61-
mkdir -p /home/syncmaster/.ivy2 && \
61+
mkdir -p /home/syncmaster/.ivy2/ && \
6262
cp --recursive /root/.ivy2/ /home/syncmaster/.ivy2/
6363
# if someone uses custom worker image, they should download jars on their own
6464

@@ -76,7 +76,7 @@ COPY --from=builder /app/.venv/ /app/.venv/
7676
# custom Spark session function may download different jars, so syncmaster have to own them
7777
COPY --from=ivy2_packages --chown=syncmaster:syncmaster /home/syncmaster/.ivy2/ /home/syncmaster/.ivy2/
7878
# If someone needs to use worker image with root user, use the same jars
79-
RUN ln -s /home/syncmaster/.ivy2 /root/.ivy2
79+
RUN ln -s /home/syncmaster/.ivy2/ /root/.ivy2/
8080

8181
COPY ./syncmaster/ /app/syncmaster/
8282
RUN python -m compileall syncmaster

0 commit comments

Comments
 (0)