add pip cache in dockerfile
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2532>
This commit is contained in:
parent
1553dee1cb
commit
9a6e418b2e
|
@ -53,7 +53,8 @@ ENV PATH="/venv/bin:$PATH"
|
||||||
COPY --from=requirements /requirements.txt /requirements.txt
|
COPY --from=requirements /requirements.txt /requirements.txt
|
||||||
COPY --from=requirements /dev-requirements.txt /dev-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 --upgrade pip; \
|
||||||
pip3 install setuptools wheel; \
|
pip3 install setuptools wheel; \
|
||||||
# Currently we are unable to relieably build rust-based packages on armv7. This
|
# Currently we are unable to relieably build rust-based packages on armv7. This
|
||||||
|
@ -69,7 +70,8 @@ RUN set -eux; \
|
||||||
watchfiles==0.18.1
|
watchfiles==0.18.1
|
||||||
|
|
||||||
ARG install_dev_deps=0
|
ARG install_dev_deps=0
|
||||||
RUN set -eux; \
|
RUN --mount=type=cache,target=~/.cache/pip; \
|
||||||
|
set -eux; \
|
||||||
if [ "$install_dev_deps" = "1" ] ; then \
|
if [ "$install_dev_deps" = "1" ] ; then \
|
||||||
grep -Ev 'cryptography|lxml|pillow|psycopg2|watchfiles' /dev-requirements.txt \
|
grep -Ev 'cryptography|lxml|pillow|psycopg2|watchfiles' /dev-requirements.txt \
|
||||||
| pip3 install -r /dev/stdin \
|
| pip3 install -r /dev/stdin \
|
||||||
|
@ -111,7 +113,8 @@ ENV PATH="/venv/bin:$PATH"
|
||||||
COPY . /app
|
COPY . /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN set -eux; \
|
RUN --mount=type=cache,target=~/.cache/pip; \
|
||||||
|
set -eux; \
|
||||||
pip3 install --no-deps --editable .
|
pip3 install --no-deps --editable .
|
||||||
|
|
||||||
ENV IS_DOCKER_SETUP=true
|
ENV IS_DOCKER_SETUP=true
|
||||||
|
|
Loading…
Reference in New Issue