File tree Expand file tree Collapse file tree 3 files changed +40
-7
lines changed
Expand file tree Collapse file tree 3 files changed +40
-7
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,13 @@ ENV PYTHONPATH=/app
1313COPY ./pyproject.toml ./poetry.lock* /app/
1414
1515RUN pip install --upgrade pip setuptools wheel packaging
16- RUN poetry install --no-root --extras "scheduler" --extras "server" --without test,docs,dev
16+ RUN --mount=type=cache,target=/root/.cache/pypoetry \
17+ poetry install \
18+ --no-root \
19+ # TODO: make scheduler independent from server
20+ --extras "server" \
21+ --extras "scheduler" \
22+ --without test,docs,dev
1723
1824COPY ./docker/entrypoint_scheduler.sh /app/entrypoint.sh
1925ENTRYPOINT ["/app/entrypoint.sh"]
@@ -25,5 +31,11 @@ COPY ./syncmaster/ /app/syncmaster/
2531
2632FROM base AS test
2733
28- RUN poetry install --no-root --all-extras --with test --without docs,dev
34+ RUN --mount=type=cache,target=/root/.cache/pypoetry \
35+ poetry install \
36+ --no-root \
37+ --extras "scheduler" \
38+ --with test \
39+ --without docs,dev
40+
2941RUN sed -i 's/python -m/coverage run -m/g' /app/entrypoint.sh
Original file line number Diff line number Diff line change @@ -14,7 +14,11 @@ ENV PYTHONPATH=/app
1414COPY ./pyproject.toml ./poetry.lock* /app/
1515
1616RUN pip install --upgrade pip setuptools wheel packaging
17- RUN poetry install --no-root --extras "server" --without test,docs,dev
17+ RUN --mount=type=cache,target=/root/.cache/pypoetry \
18+ poetry install \
19+ --no-root \
20+ --extras "server" \
21+ --without test,docs,dev
1822
1923COPY ./docker/entrypoint_server.sh /app/entrypoint.sh
2024ENTRYPOINT ["/app/entrypoint.sh"]
@@ -41,5 +45,11 @@ ENV SYNCMASTER__SERVER__OPENAPI__SWAGGER__JS_URL=/static/swagger/swagger-ui-bund
4145
4246FROM base AS test
4347
44- RUN poetry install --no-root --extras "server" --with test --without docs,dev
48+ RUN --mount=type=cache,target=/root/.cache/pypoetry \
49+ poetry install \
50+ --no-root \
51+ --extras "server" \
52+ --with test \
53+ --without docs,dev
54+
4555RUN sed -i 's/python -m/coverage run -m/g' /app/entrypoint.sh
Original file line number Diff line number Diff line change @@ -30,7 +30,11 @@ ENV PYTHONPATH=/app
3030COPY ./pyproject.toml ./poetry.lock* /app/
3131
3232RUN pip install --upgrade pip setuptools wheel packaging
33- RUN poetry install --no-root --extras "worker" --without test,docs,dev
33+ RUN --mount=type=cache,target=/root/.cache/pypoetry \
34+ poetry install \
35+ --no-root \
36+ --extras "worker" \
37+ --without test,docs,dev
3438
3539COPY ./docker/entrypoint_worker.sh /app/entrypoint.sh
3640ENTRYPOINT ["/app/entrypoint.sh"]
@@ -46,6 +50,13 @@ FROM base AS test
4650
4751ENV SYNCMASTER__WORKER__CREATE_SPARK_SESSION_FUNCTION=tests.spark.get_worker_spark_session
4852
49- # CI runs tests in the worker container, so we need server dependencies too
50- RUN poetry install --no-root --all-extras --with test --without docs,dev
53+ # CI runs tests in the worker container, so we need server & scheduler dependencies too
54+
55+ RUN --mount=type=cache,target=/root/.cache/pypoetry \
56+ poetry install \
57+ --no-root \
58+ --all-extras \
59+ --with test \
60+ --without docs,dev
61+
5162RUN sed -i 's/python -m/coverage run -m/g' /app/entrypoint.sh
You can’t perform that action at this time.
0 commit comments