Skip to content

Commit 6755157

Browse files
author
kwaak
committed
chore: update Dockerfile to use Python base image and add kwaak configuration file
1 parent ecb6d88 commit 6755157

File tree

2 files changed

+75
-49
lines changed

2 files changed

+75
-49
lines changed

Dockerfile

Lines changed: 4 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,7 @@
1-
FROM nvidia/cuda:12.3.1-devel-ubuntu20.04
1+
FROM python:3.10
22

3-
# Non-interactive apt-get commands
4-
ARG DEBIAN_FRONTEND=noninteractive
3+
RUN apt-get update && apt install git -y --no-install-recommends
54

6-
# No GPUs visible during build
7-
ARG CUDA_VISIBLE_DEVICES=none
5+
COPY . /app
86

9-
# Specify CUDA architectures -> 7.5: RTX 6000 & T4, 8.0: A100, 8.6+PTX
10-
ARG TORCH_CUDA_ARCH_LIST="7.5;8.0;8.6+PTX"
11-
12-
# Set the Python version
13-
ARG PYTHON_VERSION=3.10.12
14-
15-
# Install system dependencies
16-
RUN apt-get update && apt-get install -y \
17-
wget build-essential libssl-dev zlib1g-dev libbz2-dev \
18-
libreadline-dev libsqlite3-dev libffi-dev libncursesw5-dev \
19-
xz-utils tk-dev libxml2-dev libxmlsec1-dev liblzma-dev git vim \
20-
&& rm -rf /var/lib/apt/lists/*
21-
22-
# Install Python
23-
RUN wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz && \
24-
tar -xzf Python-$PYTHON_VERSION.tgz && \
25-
cd Python-$PYTHON_VERSION && \
26-
./configure --enable-optimizations && \
27-
make -j$(nproc) && \
28-
make altinstall && \
29-
cd .. && \
30-
rm -rf Python-$PYTHON_VERSION.tgz Python-$PYTHON_VERSION
31-
32-
# Install pip and core Python tools
33-
RUN wget https://bootstrap.pypa.io/get-pip.py && \
34-
python3.10 get-pip.py && \
35-
rm get-pip.py && \
36-
python3.10 -m pip install --upgrade pip setuptools wheel uv
37-
38-
# Set up project
39-
WORKDIR /vec-inf
40-
COPY . /vec-inf
41-
42-
# Install project dependencies with build requirements
43-
RUN PIP_INDEX_URL="https://download.pytorch.org/whl/cu121" uv pip install --system -e .[dev]
44-
# Install Flash Attention
45-
RUN python3.10 -m pip install flash-attn --no-build-isolation
46-
47-
# Final configuration
48-
RUN mkdir -p /vec-inf/nccl && \
49-
mv /root/.config/vllm/nccl/cu12/libnccl.so.2.18.1 /vec-inf/nccl/libnccl.so.2.18.1
50-
51-
# Set the default command to start an interactive shell
52-
CMD ["bash"]
7+
WORKDIR /app

kwaak.toml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# This is a a prefilled template for `kwaak`
2+
#
3+
# Several assumptions and defaults have been filled in. For proper usage, please customize the values to your needs.
4+
project_name = "vector-inference"
5+
language = "Python"
6+
7+
## If you are using OpenAI, set the api key here
8+
openai_api_key = "env:OPENAI_API_KEY"
9+
10+
11+
## If you are using Anthropic, set the api key here
12+
#anthropic_api_key = "env:ANTHROPIC_API_KEY"
13+
14+
15+
## Optional: Connect kwaak to github to create PRs, search code, and automatically push to a remote
16+
github_api_key = "env:GITHUB_TOKEN"
17+
18+
19+
## Optional: Connect kwaak to tavily to enable it to search the web
20+
#tavily_api_key = "env:TAVILY_API_KEY"
21+
22+
## Commands the agent uses for tools
23+
## Kwaak can use tests, coverage, and lints to verify generated code.
24+
## At the moment, the format of the output does not matter.
25+
[commands]
26+
## Optional: Allows an agent to run tests. Recommended.
27+
# Example: test = "cargo test --no-fail-fast --color=never"
28+
#test = "<YOUR TEST COMMAND>"
29+
## Optional: Allows an agent to run coverage. The coverage command should run the tests and output the coverage results to stdout.
30+
# Example: coverage = "cargo llvm-cov --no-clean --summary-only"
31+
#coverage = "<YOUR COVERAGE COMMAND>"
32+
## Optional: Lint and fix command. This command is run after each completion cycle, before committing the code.
33+
# Recommended to use, as it avoids the LLM getting distracted by linting issues
34+
# Example: lint_and_fix = "cargo clippy --fix --allow-dirty --allow-staged && cargo fmt"
35+
#lint_and_fix = "<YOUR LINT AND FIX COMMAND>"
36+
37+
## Git and GitHub configuration
38+
#
39+
## Kwaak can create and update PRs on Github, search github code, and interact with the git repository. This requires a github token.
40+
## If you leave the token empty, kwaak will not create PRs.
41+
[git]
42+
main_branch = "develop"
43+
owner = "VectorInstitute"
44+
repository = "vector-inference"
45+
auto_push_remote = false
46+
47+
## Kwaak uses different LLMs for different tasks. As a rule of thumb, tasks that happen often (like indexing, summarizing) require a small, fast model
48+
## and tasks that happen less often (like completion) can use a larger, more accurate model.
49+
#
50+
## You can overwrite the api key and base url per kind of task if needed.
51+
[llm.indexing]
52+
provider = "OpenAI"
53+
prompt_model = "gpt-4o-mini"
54+
[llm.query]
55+
provider = "OpenAI"
56+
prompt_model = "gpt-4o"
57+
[llm.embedding]
58+
provider = "OpenAI"
59+
embedding_model = "text-embedding-3-large"
60+
## Docker configuration
61+
## kwaak requires a Dockerfile for the tool execution environment.
62+
## Besides the dependencies to run the code, there are several additional dependencies:
63+
## - `git` for interacting with the codebase
64+
## - `rg` (ripgrep) for searching the codebase
65+
## - `fd` (fd) for effective file searching
66+
##
67+
## In the future, an executor is planned that does not have these dependencies, but for now, they are required.
68+
##
69+
## If your project already has a Dockerfile and you want to keep it clean, you can specify a different file to use.
70+
[docker]
71+
dockerfile = "Dockerfile"

0 commit comments

Comments
 (0)