From 54ca7ceac839857c7de3ab4dd0239c96ea8cc96c Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 17 Dec 2024 16:39:30 -0800 Subject: [PATCH] feat: Use buildpack-deps, python3.12, and rust in Dockerfile --- benchmark/Dockerfile | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/benchmark/Dockerfile b/benchmark/Dockerfile index f9eacd6a6..5cd765723 100644 --- a/benchmark/Dockerfile +++ b/benchmark/Dockerfile @@ -1,8 +1,26 @@ -FROM python:3.10-slim -RUN apt-get update -RUN apt-get install -y less git build-essential +FROM buildpack-deps:jammy + +# Install Python 3.12 +RUN apt-get update && apt-get install -y \ + software-properties-common \ + && add-apt-repository ppa:deadsnakes/ppa \ + && apt-get update \ + && apt-get install -y \ + python3.12 \ + python3.12-venv \ + python3.12-dev \ + python3-pip \ + && rm -rf /var/lib/apt/lists/* + +# Make python3.12 the default python3 +RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 + +# Install Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +ENV PATH="/root/.cargo/bin:${PATH}" + COPY . /aider -RUN pip install --no-cache-dir --upgrade pip -RUN pip install --no-cache-dir -e /aider[dev] +RUN pip3 install --no-cache-dir --upgrade pip +RUN pip3 install --no-cache-dir -e /aider[dev] RUN git config --global --add safe.directory /aider WORKDIR /aider