1#!/bin/bash
2set -euo pipefail
3
4# Install runtime dependencies needed by the eval-cli binary (dynamically linked
5# against glibc + these shared libraries from its GPUI/terminal/language stacks).
6apt-get update
7apt-get install -y --no-install-recommends \
8 ca-certificates \
9 curl \
10 git \
11 libasound2 \
12 libfontconfig1 \
13 libglib2.0-0 \
14 libsqlite3-0 \
15 libssl3 \
16 libwayland-client0 \
17 libx11-xcb1 \
18 libxkbcommon-x11-0 \
19 libzstd1
20
21# Install Node.js 22 LTS (needed by language servers like basedpyright).
22curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
23apt-get install -y --no-install-recommends nodejs
24
25# Install uv (needed for running Python tests in SWE-bench tasks).
26curl -LsSf https://astral.sh/uv/install.sh | sh
27. "$HOME/.local/bin/env"
28ln -sf "$HOME/.local/bin/uv" /usr/local/bin/uv
29ln -sf "$HOME/.local/bin/uvx" /usr/local/bin/uvx
30
31{% if binary_uploaded is defined %}
32# Binary was uploaded directly via setup() — just verify it works.
33eval-cli --help
34{% elif download_url is defined %}
35curl -fsSL "{{ download_url }}" -o /usr/local/bin/eval-cli
36chmod +x /usr/local/bin/eval-cli
37eval-cli --help
38{% else %}
39echo "ERROR: No eval-cli binary provided."
40echo ""
41echo "Either pass binary_path= to upload a local build:"
42echo " --ae binary_path=/path/to/target/release/eval-cli"
43echo ""
44echo "Or set download_url= / EVAL_CLI_DOWNLOAD_URL:"
45echo " --ae download_url=https://example.com/eval-cli"
46exit 1
47{% endif %}
48
49echo "INSTALL_SUCCESS"