More progress

This commit is contained in:
cte 2025-04-01 23:53:53 -05:00
parent cd60b34f32
commit afc1278110
6 changed files with 1442 additions and 169 deletions

View file

@ -1,86 +0,0 @@
FROM node:20-slim AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
RUN npm install -g npm@latest
RUN npm install -g npm-run-all
# Install dependencies
RUN apt update && apt install -y sudo curl git vim jq
# Create a `vscode` user
RUN useradd -m vscode -s /bin/bash && \
echo "vscode ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/vscode && \
chmod 0440 /etc/sudoers.d/vscode
# Install VS Code
# https://code.visualstudio.com/docs/setup/linux
RUN apt install -y wget gpg apt-transport-https
RUN wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
RUN install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
RUN echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" | tee /etc/apt/sources.list.d/vscode.list > /dev/null
RUN rm -f packages.microsoft.gpg
RUN apt update && apt install -y code
# Install Xvfb
RUN apt install -y xvfb
# [cpp] Install cmake 3.28.3
RUN apt install -y cmake
# [go] Install Go 1.22.2
RUN apt install -y golang-go
# [java] Install Java 21
RUN apt install -y default-jre
# [python] Install Python 3.12.3 and uv 0.6.6
RUN apt install -y python3 python3-venv python3-dev python3-pip
# [rust] Install Rust 1.85
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
WORKDIR /home/vscode
USER vscode
# Copy exercises
RUN git clone https://github.com/cte/Roo-Code-Benchmark.git exercises
# Prepare exercises
WORKDIR /home/vscode/exercises/python
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
RUN /home/vscode/.local/bin/uv sync
WORKDIR /home/vscode/repo/benchmark
# Install dependencies
COPY --chown=vscode:vscode ./benchmark/package.json ./benchmark/pnpm-lock.yaml ./benchmark/pnpm-workspace.yaml ./benchmark/.npmrc ./
RUN mkdir -p apps/cli apps/web \
config/eslint config/typescript \
packages/db packages/ipc packages/lib packages/types
COPY --chown=vscode:vscode ./benchmark/apps/cli/package.json ./apps/cli/
COPY --chown=vscode:vscode ./benchmark/apps/web/package.json ./apps/web/
COPY --chown=vscode:vscode ./benchmark/config/eslint/package.json ./config/eslint/
COPY --chown=vscode:vscode ./benchmark/config/typescript/package.json ./config/typescript/
COPY --chown=vscode:vscode ./benchmark/packages/db/package.json ./packages/db/
COPY --chown=vscode:vscode ./benchmark/packages/ipc/package.json ./packages/ipc/
COPY --chown=vscode:vscode ./benchmark/packages/lib/package.json ./packages/lib/
COPY --chown=vscode:vscode ./benchmark/packages/types/package.json ./packages/types/
RUN pnpm install
# Copy & install extension
COPY --chown=vscode:vscode ./bin/roo-code-latest.vsix ./
RUN code --debug --install-extension ./roo-code-latest.vsix
# Copy application code
COPY --chown=vscode:vscode ./benchmark ./
# Copy environment variables
COPY --chown=vscode:vscode ./benchmark/.env ./
# Push database schema
RUN pnpm --filter @benchmark/db db:push
EXPOSE 3000
CMD ["pnpm", "web"]

View file

@ -2,35 +2,14 @@
## Get Started
Clone the Roo Code repo:
Clone the Roo Code repo and run the setup script:
```sh
git clone https://github.com/RooVetGit/Roo-Code.git
```
Install nvm:
```sh
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash
# Reload shell.
nvm install
node --version
# Verify the version is v20.18.1.
```
Install pnpm:
```sh
npm install --global corepack@latest
corepack enable pnpm
corepack use pnpm@latest-10
```
Build the Roo Code extension:
```sh
npm run install:all
npx vsce package --out bin/roo-code-latest.vsix
cd Roo-Code
git checkout cte/benchmark-monorepo
cd benchmark
./scripts/setup.sh
```
[Install](https://docs.docker.com/desktop/) and run Docker Desktop.

View file

@ -8,16 +8,9 @@
"test": "turbo test --log-order grouped --output-logs new-only",
"format": "turbo format --log-order grouped --output-logs new-only",
"build": "turbo build --log-order grouped --output-logs new-only",
"web": "turbo dev --filter @benchmark/web --output-logs new-only --ui tui",
"cli": "turbo dev --filter @benchmark/cli --output-logs new-only --ui tui -- run",
"drizzle:studio": "pnpm --filter @benchmark/db db:studio",
"docker:build": "docker build -f Dockerfile -t roo-code-benchmark --progress=plain ..",
"docker:run": "docker run -d -it -p 3000:3000 -v /tmp/benchmarks.db:/tmp/benchmarks.db roo-code-benchmark",
"docker:start": "pnpm docker:build && pnpm docker:run",
"docker:shell": "docker exec -it $(docker ps --filter \"ancestor=roo-code-benchmark\" -q) /bin/zsh",
"docker:stop": "docker stop $(docker ps --filter \"ancestor=roo-code-benchmark\" -q) >/dev/null 2>&1 || true",
"docker:rm": "docker rm $(docker ps -a --filter \"ancestor=roo-code-benchmark\" -q) >/dev/null 2>&1 || true",
"docker:clean": "pnpm docker:stop && pnpm docker:rm"
"web": "turbo dev --filter @benchmark/web",
"cli": "turbo dev --filter @benchmark/cli -- run",
"drizzle:studio": "pnpm --filter @benchmark/db db:studio"
},
"devDependencies": {
"@dotenvx/dotenvx": "^1.39.0",

View file

@ -65,7 +65,7 @@ done
[[ "$empty" == true ]] && exit 0
echo -e "\nInstalling dependencies..."
printf "\n"
if ! command -v brew &>/dev/null; then
if [[ -f "/opt/homebrew/bin/brew" ]]; then
@ -255,7 +255,7 @@ else
echo "✅ pnpm is installed ($PNPM_VERSION)"
fi
pnpm install || exit 1
pnpm install --silent || exit 1
if [[ ! -d "evals" ]]; then
if gh auth status &>/dev/null; then
@ -279,5 +279,27 @@ if ! grep -q "OPENROUTER_API_KEY" .env; then
read -p "Enter your OpenRouter API Key (sk-or-v1-...): " openrouter_api_key
echo "Validating OpenRouter API Key..."
curl --silent --fail https://openrouter.ai/api/v1/key -H "Authorization: Bearer $openrouter_api_key" | jq || exit 1
echo "OPENROUTER_API_KEY=$openrouter_api_key" >> .env
echo "OPENROUTER_API_KEY=$openrouter_api_key" >>.env
fi
if [[ ! -s "../bin/roo-code-latest.vsix" ]]; then
echo "Building the Roo Code extension..."
cd .. &&
npm run install-extension -- --silent --no-audit &&
npm run install-webview -- --silent --no-audit &&
npx vsce package --out bin/roo-code-latest.vsix || exit 1
fi
echo -e "\n🤘 You're ready to rock and roll!\n"
if ! nc -z localhost 3000; then
read -p "Would you like to start the evals web app? (y/N): " start_evals
if [[ "$start_evals" =~ ^[Yy]$ ]]; then
pnpm web
else
echo "You can start it anytime with 'pnpm web'."
fi
else
echo "🤖 The evals web app is running at http://localhost:3000"
fi

1452
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -427,6 +427,7 @@
"@types/string-similarity": "^4.0.2",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^7.11.0",
"@vscode/vsce": "^3.3.2",
"esbuild": "^0.24.0",
"eslint": "^8.57.0",
"execa": "^9.5.2",