|
| 1 | +# docker build -f Dockerfile -t roo-code-benchmark .. |
| 2 | +# docker run -d -it roo-code-benchmark |
| 3 | +# docker exec -it $(docker ps --filter "ancestor=roo-code-benchmark" -q) /bin/bash |
| 4 | + |
| 5 | +FROM ubuntu:latest |
| 6 | + |
| 7 | +# Install dependencies |
| 8 | +RUN apt update && apt install -y curl git vim |
| 9 | + |
| 10 | +# Install VS Code |
| 11 | +# https://code.visualstudio.com/docs/setup/linux |
| 12 | +RUN apt update && apt install -y wget gpg apt-transport-https |
| 13 | +RUN wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg |
| 14 | +RUN install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg |
| 15 | +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 |
| 16 | +RUN rm -f packages.microsoft.gpg |
| 17 | +RUN apt update && apt install -y code |
| 18 | + |
| 19 | +# Install Xvfb |
| 20 | +RUN apt install -y xvfb |
| 21 | + |
| 22 | +# Install node.js |
| 23 | +RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - |
| 24 | +RUN apt update && apt install -y nodejs |
| 25 | + |
| 26 | +# Create a `vscode` user |
| 27 | +RUN apt install -y sudo && \ |
| 28 | + useradd -m vscode -s /bin/bash && \ |
| 29 | + echo "vscode ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/vscode && \ |
| 30 | + chmod 0440 /etc/sudoers.d/vscode |
| 31 | + |
| 32 | +WORKDIR /home/vscode |
| 33 | +USER vscode |
| 34 | + |
| 35 | +COPY benchmark/entrypoint.sh /usr/local/bin/ |
| 36 | +COPY --chown=vscode:vscode . /home/vscode/repo |
| 37 | + |
| 38 | +WORKDIR /home/vscode/repo |
| 39 | +RUN npm run install-extension |
| 40 | +RUN npm run compile |
| 41 | + |
| 42 | +WORKDIR /home/vscode/repo/webview-ui |
| 43 | +RUN npm install |
| 44 | +RUN npm run build |
| 45 | + |
| 46 | +WORKDIR /home/vscode/repo/benchmark |
| 47 | +RUN npm install |
| 48 | +RUN npm run build |
| 49 | +RUN git clone https://github.com/cte/Roo-Code-Benchmark.git exercises |
| 50 | + |
| 51 | +CMD ["/bin/bash"] |
| 52 | + |
| 53 | +# FROM buildpack-deps:jammy |
| 54 | + |
| 55 | +# # Install Python 3.11 |
| 56 | +# RUN apt-get update && apt-get install -y \ |
| 57 | +# software-properties-common \ |
| 58 | +# cmake \ |
| 59 | +# libboost-all-dev \ |
| 60 | +# && add-apt-repository ppa:deadsnakes/ppa \ |
| 61 | +# && apt-get update \ |
| 62 | +# && apt-get install -y \ |
| 63 | +# python3.11 \ |
| 64 | +# python3.11-venv \ |
| 65 | +# python3.11-dev \ |
| 66 | +# python3-pip \ |
| 67 | +# ca-certificates-java \ |
| 68 | +# openjdk-21-jdk \ |
| 69 | +# libtbb-dev \ |
| 70 | +# && rm -rf /var/lib/apt/lists/* |
| 71 | + |
| 72 | +# # Make python3.11 the default python3 |
| 73 | +# RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 |
| 74 | + |
| 75 | +# # Install Go with architecture detection |
| 76 | +# RUN ARCH=$(uname -m) && \ |
| 77 | +# if [ "$ARCH" = "x86_64" ]; then \ |
| 78 | +# GOARCH="amd64"; \ |
| 79 | +# elif [ "$ARCH" = "aarch64" ]; then \ |
| 80 | +# GOARCH="arm64"; \ |
| 81 | +# else \ |
| 82 | +# false; \ |
| 83 | +# fi && \ |
| 84 | +# curl -L "https://golang.org/dl/go1.21.5.linux-$GOARCH.tar.gz" -o go.tar.gz && \ |
| 85 | +# tar -C /usr/local -xzf go.tar.gz && \ |
| 86 | +# rm go.tar.gz |
| 87 | +# ENV PATH="/usr/local/go/bin:${PATH}" |
| 88 | + |
| 89 | +# # Install Rust |
| 90 | +# ADD https://sh.rustup.rs /tmp/rustup.sh |
| 91 | +# RUN chmod +x /tmp/rustup.sh && /tmp/rustup.sh -y && rm /tmp/rustup.sh |
| 92 | +# ENV PATH="/root/.cargo/bin:${PATH}" |
| 93 | + |
| 94 | +# # Install Node.js and dependencies |
| 95 | +# RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ |
| 96 | +# apt-get install -y nodejs && \ |
| 97 | +# rm -rf /var/lib/apt/lists/* && \ |
| 98 | +# mkdir -p /npm-install && \ |
| 99 | +# cd /npm-install && \ |
| 100 | +# npm init -y && \ |
| 101 | +# npm install \ |
| 102 | +# jest \ |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | +# COPY . /aider |
| 113 | +# RUN pip3 install --no-cache-dir --upgrade pip uv |
| 114 | +# RUN uv pip install --system --no-cache-dir -e /aider[dev] |
| 115 | +# RUN git config --global --add safe.directory /aider |
| 116 | +# WORKDIR /aider |
0 commit comments