add pip cache in dockerfile

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2532>
2205-channel-page-pagination-link-dont-working
Petitminion 2023-07-20 14:09:17 +02:00
rodzic 1553dee1cb
commit 9a6e418b2e
1 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -53,7 +53,8 @@ ENV PATH="/venv/bin:$PATH"
COPY --from=requirements /requirements.txt /requirements.txt
COPY --from=requirements /dev-requirements.txt /dev-requirements.txt
RUN set -eux; \
RUN --mount=type=cache,target=~/.cache/pip; \
set -eux; \
pip3 install --upgrade pip; \
pip3 install setuptools wheel; \
# Currently we are unable to relieably build rust-based packages on armv7. This
@ -69,7 +70,8 @@ RUN set -eux; \
watchfiles==0.18.1
ARG install_dev_deps=0
RUN set -eux; \
RUN --mount=type=cache,target=~/.cache/pip; \
set -eux; \
if [ "$install_dev_deps" = "1" ] ; then \
grep -Ev 'cryptography|lxml|pillow|psycopg2|watchfiles' /dev-requirements.txt \
| pip3 install -r /dev/stdin \
@ -111,7 +113,8 @@ ENV PATH="/venv/bin:$PATH"
COPY . /app
WORKDIR /app
RUN set -eux; \
RUN --mount=type=cache,target=~/.cache/pip; \
set -eux; \
pip3 install --no-deps --editable .
ENV IS_DOCKER_SETUP=true