Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
79 lines (63 loc) · 2.21 KB

File metadata and controls

79 lines (63 loc) · 2.21 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env bash
set -euo pipefail
# Colors for output
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
log_info() { echo -e "${GREEN}[INFO]${NC} $*"; }
log_warn() { echo -e "${YELLOW}[WARN]${NC} $*"; }
REPO_ID="verifiers"
has_ssh_access() {
# Probe SSH auth to GitHub without prompting; treat any nonzero as "no ssh"
# We try a quick ls-remote to avoid cloning on failure.
# Disable -e for the probe so the script doesn't exit on a failed test.
set +e
timeout 5s git ls-remote --heads git@github.com:PrimeIntellect-ai/${REPO_ID}.git >/dev/null 2>&1
rc=$?
set -e
return $rc
}
ensure_known_hosts() {
# Make sure ~/.ssh exists with the right perms, then add GitHub host key.
mkdir -p "${HOME}/.ssh"
chmod 700 "${HOME}/.ssh"
# Use -H to hash hostnames; merge uniquely to avoid dupes.
if command -v ssh-keyscan >/dev/null 2>&1; then
ssh-keyscan -H github.com 2>/dev/null | sort -u \
| tee -a "${HOME}/.ssh/known_hosts" >/dev/null
chmod 600 "${HOME}/.ssh/known_hosts"
fi
}
main() {
# Ensure sudo exists
if ! command -v sudo &>/dev/null; then
apt update
apt install -y sudo
fi
log_info "Installing base packages..."
sudo apt update && sudo apt install -y build-essential openssh-client curl git tmux htop nvtop
log_info "Configuring SSH known_hosts for GitHub..."
ensure_known_hosts
log_info "Determining best way to clone (SSH vs HTTPS)..."
if has_ssh_access; then
log_info "SSH access to GitHub works. Cloning via SSH."
git clone git@github.com:PrimeIntellect-ai/${REPO_ID}.git
else
log_warn "SSH auth to GitHub not available. Cloning via HTTPS."
git clone https://github.com/PrimeIntellect-ai/${REPO_ID}.git
fi
log_info "Entering project directory..."
cd ${REPO_ID}
log_info "Installing uv..."
curl -LsSf https://astral.sh/uv/install.sh | sh
log_info "Sourcing uv environment..."
if ! command -v uv &> /dev/null; then
source $HOME/.local/bin/env
fi
log_info "Syncing virtual environment..."
uv sync
log_info "Installing pre-commit hooks..."
uv run pre-commit install
log_info "Installation completed!"
}
main
Morty Proxy This is a proxified and sanitized view of the page, visit original site.