mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-21 12:55:00 +00:00
Build multi-stage Docker images for core "aider" and full "aider-full" versions
This commit is contained in:
parent
bf4d87d66f
commit
4fded189f8
2 changed files with 33 additions and 13 deletions
15
.github/workflows/release.yml
vendored
15
.github/workflows/release.yml
vendored
|
@ -41,7 +41,7 @@ jobs:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker images
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
@ -51,3 +51,16 @@ jobs:
|
||||||
tags: |
|
tags: |
|
||||||
${{ secrets.DOCKERHUB_USERNAME }}/aider:${{ github.ref_name }}
|
${{ secrets.DOCKERHUB_USERNAME }}/aider:${{ github.ref_name }}
|
||||||
${{ secrets.DOCKERHUB_USERNAME }}/aider:latest
|
${{ secrets.DOCKERHUB_USERNAME }}/aider:latest
|
||||||
|
target: aider
|
||||||
|
|
||||||
|
- name: Build and push Docker full image
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./docker/Dockerfile
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
${{ secrets.DOCKERHUB_USERNAME }}/aider-full:${{ github.ref_name }}
|
||||||
|
${{ secrets.DOCKERHUB_USERNAME }}/aider-full:latest
|
||||||
|
target: aider-full
|
||||||
|
|
|
@ -1,16 +1,23 @@
|
||||||
FROM python:3.10-slim
|
FROM python:3.10-slim AS base
|
||||||
|
|
||||||
COPY . /aider
|
|
||||||
|
|
||||||
# Unfortunately to build the multi-arch docker image we need `build-essential` for amd64.
|
|
||||||
# Apparently py-tree-sitter-languages doesn't have a pre-built binary wheel?
|
|
||||||
# Apparently Playwright needs build-essentials too.
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
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 && \
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
rm -rf /var/lib/apt/lists/*
|
||||||
pip install --no-cache-dir /aider --extra-index-url https://download.pytorch.org/whl/cpu && \
|
|
||||||
rm -rf /aider
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
FROM base AS aider-full
|
||||||
|
|
||||||
|
COPY . /aider
|
||||||
|
RUN pip install --no-cache-dir /aider[help,browser] --extra-index-url https://download.pytorch.org/whl/cpu && \
|
||||||
|
rm -rf /aider
|
||||||
|
|
||||||
|
ENTRYPOINT ["aider"]
|
||||||
|
|
||||||
|
FROM base AS aider
|
||||||
|
|
||||||
|
COPY . /aider
|
||||||
|
RUN pip install --no-cache-dir /aider --extra-index-url https://download.pytorch.org/whl/cpu && \
|
||||||
|
rm -rf /aider
|
||||||
|
|
||||||
ENTRYPOINT ["aider"]
|
ENTRYPOINT ["aider"]
|
Loading…
Add table
Add a link
Reference in a new issue