mirror of
https://github.com/ThePhaseless/Byparr.git
synced 2025-03-15 01:40:21 +08:00
cache apt and uv libs
This commit is contained in:
parent
368634931a
commit
971931aa7d
@ -15,13 +15,15 @@ ENV PATH="${HOME}/.local/bin:$PATH"
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apt update &&\
|
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||||
|
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||||
|
apt update && \
|
||||||
apt install -y --no-install-recommends --no-install-suggests xauth xvfb scrot wget chromium chromium-driver ca-certificates
|
apt install -y --no-install-recommends --no-install-suggests xauth xvfb scrot wget chromium chromium-driver ca-certificates
|
||||||
|
|
||||||
ADD https://astral.sh/uv/install.sh install.sh
|
ADD https://astral.sh/uv/install.sh install.sh
|
||||||
RUN sh install.sh
|
RUN sh install.sh
|
||||||
COPY pyproject.toml uv.lock ./
|
COPY pyproject.toml uv.lock ./
|
||||||
RUN uv sync
|
RUN --mount=type=cache,target=${HOME}/.cache/uv uv sync
|
||||||
|
|
||||||
# SeleniumBase does not come with an arm64 chromedriver binary
|
# SeleniumBase does not come with an arm64 chromedriver binary
|
||||||
RUN cd .venv/lib/*/site-packages/seleniumbase/drivers && ln -s /usr/bin/chromedriver uc_driver
|
RUN cd .venv/lib/*/site-packages/seleniumbase/drivers && ln -s /usr/bin/chromedriver uc_driver
|
||||||
@ -30,7 +32,7 @@ COPY . .
|
|||||||
|
|
||||||
FROM base AS test
|
FROM base AS test
|
||||||
|
|
||||||
RUN uv sync --group test
|
RUN --mount=type=cache,target=${HOME}/.cache/uv uv sync --group test
|
||||||
RUN ./test.sh
|
RUN ./test.sh
|
||||||
|
|
||||||
FROM base
|
FROM base
|
||||||
|
Loading…
x
Reference in New Issue
Block a user