diff --git a/services/agent/Dockerfile b/services/agent/Dockerfile index 96bf80a4a14..0f406116ca1 100644 --- a/services/agent/Dockerfile +++ b/services/agent/Dockerfile @@ -90,7 +90,7 @@ WORKDIR /build # NOTE: copies to /build to avoid overwriting later which would invalidate this layer RUN \ --mount=type=bind,source=services/agent/requirements/_base.txt,target=_base.txt \ - --mount=type=cache,mode=0755,target=/root/.cache/pip \ + --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \ pip install \ --requirement _base.txt diff --git a/services/api-server/Dockerfile b/services/api-server/Dockerfile index 89a3a455610..cba594a277c 100644 --- a/services/api-server/Dockerfile +++ b/services/api-server/Dockerfile @@ -86,7 +86,7 @@ WORKDIR /build # NOTE: copies to /build to avoid overwriting later which would invalidate this layer RUN \ --mount=type=bind,source=services/api-server/requirements/_base.txt,target=_base.txt \ - --mount=type=cache,mode=0755,target=/root/.cache/pip \ + --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \ pip install \ --requirement _base.txt diff --git a/services/autoscaling/Dockerfile b/services/autoscaling/Dockerfile index 443990210b8..f62f0c8f12b 100644 --- a/services/autoscaling/Dockerfile +++ b/services/autoscaling/Dockerfile @@ -107,7 +107,7 @@ WORKDIR /build # NOTE: copies to /build to avoid overwriting later which would invalidate this layer RUN \ --mount=type=bind,source=services/autoscaling/requirements/_base.txt,target=_base.txt \ - --mount=type=cache,mode=0755,target=/root/.cache/pip \ + --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \ pip install \ --requirement _base.txt diff --git a/services/catalog/Dockerfile b/services/catalog/Dockerfile index dad4b0aa9b4..0502b440568 100644 --- a/services/catalog/Dockerfile +++ b/services/catalog/Dockerfile @@ -86,7 +86,7 @@ WORKDIR /build # NOTE: copies to /build to avoid overwriting later which would invalidate this layer RUN \ --mount=type=bind,source=services/catalog/requirements/_base.txt,target=_base.txt \ - --mount=type=cache,mode=0755,target=/root/.cache/pip \ + --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \ pip install \ --requirement _base.txt diff --git a/services/clusters-keeper/Dockerfile b/services/clusters-keeper/Dockerfile index 1999f62bb11..594d9bd0d9d 100644 --- a/services/clusters-keeper/Dockerfile +++ b/services/clusters-keeper/Dockerfile @@ -107,7 +107,7 @@ WORKDIR /build # NOTE: copies to /build to avoid overwriting later which would invalidate this layer RUN \ --mount=type=bind,source=services/clusters-keeper/requirements/_base.txt,target=_base.txt \ - --mount=type=cache,mode=0755,target=/root/.cache/pip \ + --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \ pip install \ --requirement _base.txt diff --git a/services/dask-sidecar/Dockerfile b/services/dask-sidecar/Dockerfile index 474935363db..1eedd644750 100644 --- a/services/dask-sidecar/Dockerfile +++ b/services/dask-sidecar/Dockerfile @@ -52,7 +52,8 @@ ENV LANG=C.UTF-8 \ ENV PATH="${VIRTUAL_ENV}/bin:$PATH" # for ARM architecture this helps a lot VS building packages -ENV PIP_EXTRA_INDEX_URL=https://www.piwheels.org/simple +# NOTE: remove as this might create bad caching behaviour +# ENV PIP_EXTRA_INDEX_URL=https://www.piwheels.org/simple EXPOSE 8080 @@ -94,7 +95,7 @@ WORKDIR /build # install base 3rd party dependencies (NOTE: this speeds up devel mode) RUN \ --mount=type=bind,source=services/dask-sidecar/requirements/_base.txt,target=_base.txt \ - --mount=type=cache,mode=0755,target=/root/.cache/pip \ + --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \ pip install \ --requirement _base.txt diff --git a/services/datcore-adapter/Dockerfile b/services/datcore-adapter/Dockerfile index 56435f82b40..58896bb8a8e 100644 --- a/services/datcore-adapter/Dockerfile +++ b/services/datcore-adapter/Dockerfile @@ -87,7 +87,7 @@ WORKDIR /build # NOTE: copies to /build to avoid overwriting later which would invalidate this layer RUN \ --mount=type=bind,source=services/datcore-adapter/requirements/_base.txt,target=_base.txt \ - --mount=type=cache,mode=0755,target=/root/.cache/pip \ + --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \ pip install \ --requirement _base.txt diff --git a/services/director-v2/Dockerfile b/services/director-v2/Dockerfile index 5d5afebdd23..cac0d5ea09a 100644 --- a/services/director-v2/Dockerfile +++ b/services/director-v2/Dockerfile @@ -87,7 +87,7 @@ WORKDIR /build # NOTE: copies to /build to avoid overwriting later which would invalidate this layer RUN \ --mount=type=bind,source=services/director-v2/requirements/_base.txt,target=_base.txt \ - --mount=type=cache,mode=0755,target=/root/.cache/pip \ + --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \ pip install \ --requirement _base.txt diff --git a/services/invitations/Dockerfile b/services/invitations/Dockerfile index 61725547487..726e5d48c4b 100644 --- a/services/invitations/Dockerfile +++ b/services/invitations/Dockerfile @@ -86,7 +86,7 @@ WORKDIR /build # NOTE: copies to /build to avoid overwriting later which would invalidate this layer RUN \ --mount=type=bind,source=services/invitations/requirements/_base.txt,target=_base.txt \ - --mount=type=cache,mode=0755,target=/root/.cache/pip \ + --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \ pip install \ --requirement _base.txt diff --git a/services/osparc-gateway-server/Dockerfile b/services/osparc-gateway-server/Dockerfile index afb65df54c7..d5a5bdee290 100644 --- a/services/osparc-gateway-server/Dockerfile +++ b/services/osparc-gateway-server/Dockerfile @@ -46,7 +46,8 @@ ENV LANG=C.UTF-8 \ ENV PATH="${VIRTUAL_ENV}/bin:$PATH" # for ARM architecture this helps a lot VS building packages -ENV PIP_EXTRA_INDEX_URL=https://www.piwheels.org/simple +# NOTE: remove as this might create bad caching behaviour +# ENV PIP_EXTRA_INDEX_URL=https://www.piwheels.org/simple EXPOSE 8000 @@ -85,7 +86,7 @@ WORKDIR /build # install base 3rd party dependencies (NOTE: this speeds up devel mode) RUN \ --mount=type=bind,source=services/osparc-gateway-server/requirements/_base.txt,target=_base.txt \ - --mount=type=cache,mode=0755,target=/root/.cache/pip \ + --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \ pip install \ --requirement _base.txt @@ -113,7 +114,7 @@ WORKDIR /build/services/osparc-gateway-server RUN \ --mount=type=bind,source=packages,target=/build/packages,rw \ --mount=type=bind,source=services/osparc-gateway-server,target=/build/services/osparc-gateway-server,rw \ - --mount=type=cache,mode=0755,target=/root/.cache/pip \ + --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \ pip install \ --requirement requirements/prod.txt diff --git a/services/payments/Dockerfile b/services/payments/Dockerfile index cb64372ad40..f37db0b8e06 100644 --- a/services/payments/Dockerfile +++ b/services/payments/Dockerfile @@ -86,7 +86,7 @@ WORKDIR /build # NOTE: copies to /build to avoid overwriting later which would invalidate this layer RUN \ --mount=type=bind,source=services/payments/requirements/_base.txt,target=_base.txt \ - --mount=type=cache,mode=0755,target=/root/.cache/pip \ + --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \ pip install \ --requirement _base.txt diff --git a/services/resource-usage-tracker/Dockerfile b/services/resource-usage-tracker/Dockerfile index 8ff863203ce..40663ef4d80 100644 --- a/services/resource-usage-tracker/Dockerfile +++ b/services/resource-usage-tracker/Dockerfile @@ -87,7 +87,7 @@ WORKDIR /build # NOTE: copies to /build to avoid overwriting later which would invalidate this layer RUN \ --mount=type=bind,source=services/resource-usage-tracker/requirements/_base.txt,target=_base.txt \ - --mount=type=cache,mode=0755,target=/root/.cache/pip \ + --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \ pip install \ --requirement _base.txt diff --git a/services/storage/Dockerfile b/services/storage/Dockerfile index f860c6f4d73..d3c02de9d8e 100644 --- a/services/storage/Dockerfile +++ b/services/storage/Dockerfile @@ -94,7 +94,7 @@ WORKDIR /build # install only base 3rd party dependencies RUN \ --mount=type=bind,source=services/storage/requirements/_base.txt,target=_base.txt \ - --mount=type=cache,mode=0755,target=/root/.cache/pip \ + --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \ pip install \ --requirement _base.txt diff --git a/services/web/Dockerfile b/services/web/Dockerfile index ef430019588..af522ad6914 100644 --- a/services/web/Dockerfile +++ b/services/web/Dockerfile @@ -97,7 +97,7 @@ WORKDIR /build # install only base 3rd party dependencies RUN \ --mount=type=bind,source=services/web/server/requirements/_base.txt,target=_base.txt \ - --mount=type=cache,mode=0755,target=/root/.cache/pip \ + --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private \ pip install \ --requirement _base.txt