From f068e49501f615768cca9b164ad1fe1ac98d1bb4 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 18 Oct 2023 08:24:12 -0700 Subject: [PATCH] added experimental docker image --- docker/Dockerfile | 7 +++++++ docker/README.md | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 docker/Dockerfile create mode 100644 docker/README.md diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 000000000..5bacb755c --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,7 @@ +FROM python:3.10-slim +RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* +RUN pip install --upgrade pip && pip install aider-chat +WORKDIR /app +CMD ["aider"] + + diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 000000000..85e34c27f --- /dev/null +++ b/docker/README.md @@ -0,0 +1,32 @@ + +# Running aider with docker (experimental) + +You can run aider via docker without doing any local installation, like this: + + +``` +docker run -it --volume `pwd`:/app paulgauthier/aider aider +``` + +You will also need to pass in your `OPENAI_API_KEY`, which can be done with the `--openai-api-key` argument: + + +``` +docker run -it --volume `pwd`:/app paulgauthier/aider aider --openai-api-key $OPENAI_API_KEY +``` + +You should run the above commands from the root of your git repo. + +You should be sure your that +git repo config contains your user name and email, since the +docker container won't have your global git config: + +``` +git config user.email "you@example.com" +git config user.name "Your Name" +``` + +Be aware that when you use the in-chat `/run` command, it will +be running shell commands *inside the docker container*. +So those commands won't be running in your local environment, +which may make it tricky to `/run` tests, etc for your project.