-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
Copy pathDockerfile
43 lines (30 loc) · 1.22 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM python:3.10-slim AS base
RUN apt-get update && \
apt-get install --no-install-recommends -y build-essential git libportaudio2 && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
RUN python -m venv /venv
ENV PATH="/venv/bin:$PATH"
# Permission kludges to support `docker run --user xxx`
RUN chmod a+rwx /venv /venv/{bin,include,lib,lib/python3.1/site-packages}
RUN mkdir /.aider /.cache
RUN chmod a+rwx /.aider /.cache
# So git doesn't complain about unusual permissions
RUN git config --system --add safe.directory /app
#########################
FROM base AS aider-full
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[help,browser,playwright] \
--extra-index-url https://download.pytorch.org/whl/cpu \
&& rm -rf /tmp/aider
RUN playwright install --with-deps chromium
ENTRYPOINT ["/venv/bin/aider"]
#########################
FROM base AS 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 \
--extra-index-url https://download.pytorch.org/whl/cpu \
&& rm -rf /tmp/aider
ENTRYPOINT ["/venv/bin/aider"]