feat: Use buildpack-deps, python3.12, and rust in Dockerfile

This commit is contained in:
Paul Gauthier (aider) 2024-12-17 16:39:30 -08:00
parent cf5b38d4f5
commit 54ca7ceac8

View file

@ -1,8 +1,26 @@
FROM python:3.10-slim FROM buildpack-deps:jammy
RUN apt-get update
RUN apt-get install -y less git build-essential # 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 COPY . /aider
RUN pip install --no-cache-dir --upgrade pip RUN pip3 install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -e /aider[dev] RUN pip3 install --no-cache-dir -e /aider[dev]
RUN git config --global --add safe.directory /aider RUN git config --global --add safe.directory /aider
WORKDIR /aider WORKDIR /aider