Files
zed/crates/eval_cli/zed_eval/install.sh.j2
T
Ben Brandt 084e130a30 eval_cli: Improve setup for the eval_cli args (#52209)
## Context

Fixes some issues I ran into when running this on a remote machine.

## Self-Review Checklist

<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-03-24 11:53:08 +00:00

56 lines
1.8 KiB
Django/Jinja

#!/bin/bash
set -euo pipefail
# Install runtime dependencies needed by the eval-cli binary (dynamically linked
# against glibc + these shared libraries from its GPUI/terminal/language stacks).
apt-get update
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
libasound2 \
libfontconfig1 \
libglib2.0-0 \
libsqlite3-0 \
libssl3 \
libwayland-client0 \
libx11-xcb1 \
libxkbcommon-x11-0 \
libzstd1
# Install Node.js 22 LTS (needed by language servers like basedpyright).
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y --no-install-recommends nodejs
# Preinstall basedpyright in Zed's language server cache to avoid first-run npm install latency.
ZED_DATA_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/zed"
BASEDPYRIGHT_DIR="$ZED_DATA_DIR/languages/basedpyright"
mkdir -p "$BASEDPYRIGHT_DIR"
npm install --prefix "$BASEDPYRIGHT_DIR" --save-exact basedpyright
# Install uv (needed for running Python tests in SWE-bench tasks).
curl -LsSf https://astral.sh/uv/install.sh | sh
. "$HOME/.local/bin/env"
ln -sf "$HOME/.local/bin/uv" /usr/local/bin/uv
ln -sf "$HOME/.local/bin/uvx" /usr/local/bin/uvx
{% if binary_uploaded is defined %}
# Binary was uploaded directly via setup() — just verify it works.
eval-cli --help
{% elif download_url is defined %}
curl -fsSL "{{ download_url }}" -o /usr/local/bin/eval-cli
chmod +x /usr/local/bin/eval-cli
eval-cli --help
{% else %}
echo "ERROR: No eval-cli binary provided."
echo ""
echo "Either pass binary_path= to upload a local build:"
echo " --ae binary_path=/path/to/target/release/eval-cli"
echo ""
echo "Or set download_url= / EVAL_CLI_DOWNLOAD_URL:"
echo " --ae download_url=https://example.com/eval-cli"
exit 1
{% endif %}
echo "INSTALL_SUCCESS"