mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 04:14:59 +00:00
fix playwright install in both docker images
This commit is contained in:
parent
2dd7d2e0b6
commit
69b76c23e8
1 changed files with 10 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
FROM python:3.10-slim AS base
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install --no-install-recommends -y build-essential git libportaudio2 && \
|
||||
apt-get install --no-install-recommends -y build-essential git libportaudio2 pandoc && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
@ -9,11 +9,15 @@ WORKDIR /app
|
|||
RUN python -m venv /venv
|
||||
ENV PATH="/venv/bin:$PATH"
|
||||
|
||||
# https://playwright.dev/python/docs/browsers
|
||||
ENV PLAYWRIGHT_BROWSERS_PATH=/pw-browsers
|
||||
ENV PLAYWRIGHT_SKIP_BROWSER_GC=1
|
||||
|
||||
# Permission kludges to support `docker run --user xxx`
|
||||
RUN chmod a+rwx /venv /venv/bin /venv/include /venv/lib /venv/lib/python3.10/site-packages
|
||||
|
||||
RUN mkdir /.aider /.cache
|
||||
RUN chmod a+rwx /.aider /.cache
|
||||
RUN mkdir /.aider /.cache /pw-browsers
|
||||
RUN chmod a+rwx /.aider /.cache /pw-browsers
|
||||
|
||||
# So git doesn't complain about unusual permissions
|
||||
RUN git config --system --add safe.directory /app
|
||||
|
@ -29,8 +33,8 @@ RUN /venv/bin/python -m pip install --upgrade --no-cache-dir pip \
|
|||
--extra-index-url https://download.pytorch.org/whl/cpu \
|
||||
&& rm -rf /tmp/aider
|
||||
|
||||
RUN /venv/bin/python -m playwright install --with-deps chromium
|
||||
RUN find /venv/lib/python3.10/site-packages \( -type d -exec chmod a+rwx {} + \) -o \( -type f -exec chmod a+rw {} + \)
|
||||
RUN playwright install --with-deps chromium
|
||||
|
||||
ENTRYPOINT ["/venv/bin/aider"]
|
||||
|
||||
|
@ -41,10 +45,11 @@ ENV AIDER_DOCKER_IMAGE=paulgauthier/aider
|
|||
|
||||
COPY . /tmp/aider
|
||||
RUN /venv/bin/python -m pip install --upgrade --no-cache-dir pip \
|
||||
&& /venv/bin/python -m pip install --no-cache-dir /tmp/aider \
|
||||
&& /venv/bin/python -m pip install --no-cache-dir /tmp/aider[playwright] \
|
||||
--extra-index-url https://download.pytorch.org/whl/cpu \
|
||||
&& rm -rf /tmp/aider
|
||||
|
||||
RUN /venv/bin/python -m playwright install --with-deps chromium
|
||||
RUN find /venv/lib/python3.10/site-packages \( -type d -exec chmod a+rwx {} + \) -o \( -type f -exec chmod a+rw {} + \)
|
||||
|
||||
ENTRYPOINT ["/venv/bin/aider"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue