Repository navigation
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·65 lines (59 loc) · 2.95 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·65 lines (59 loc) · 2.95 KB
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
#!/usr/bin/env bash
# ASCEND installer -- run straight from a git clone.
#
# git clone https://github.com/jpliu168/ASCEND.git
# cd ASCEND && ./install.sh # interactive: pick one or more resources
#
# Non-interactive resource selection:
# ./install.sh all # same as interactive setup
# ./install.sh hazel # NCSU Hazel only
# ./install.sh ncshare # NCShare only
# ./install.sh hurricane # MEAS single-GPU box only
# ./install.sh colab # Google Colab GPU (ephemeral, any Google account)
# ./install.sh add # link YOUR OWN HPC or workstation
# # (any campus: UNC, Duke, ... or a lab box)
# ./install.sh router # just the ascend-all front door
# ./install.sh web # ascend-web: browser chat UI (see web/)
#
# Everything installs into ~/.local/bin (symlinks) and ~/.claude (skills and
# statusline). Nothing is copied out of this clone, so KEEP THE CLONE -- a
# `git pull` then updates every installed command in place.
#
# macOS, Linux, or Windows + WSL (Ubuntu). Requires: bash, ssh, rsync, git.
set -Eeuo pipefail
HERE="$(cd "$(dirname "$0")" && pwd)"
say(){ printf '\033[1m==>\033[0m %s\n' "$*"; }
die(){ printf '\033[31merror:\033[0m %s\n' "$*" >&2; exit 1; }
case "$(uname -s)" in
Darwin|Linux) : ;;
*) die "Unsupported OS. On Windows, run this inside WSL (Ubuntu)." ;;
esac
for t in ssh rsync; do command -v "$t" >/dev/null || die "missing '$t' -- install it and re-run."; done
# files that came through a Windows share lose their execute bits
find "$HERE" -name '*.sh' -exec chmod +x {} + 2>/dev/null || true
find "$HERE" -type d -name bin -exec sh -c 'chmod +x "$1"/* 2>/dev/null || true' _ {} \; 2>/dev/null || true
install_router(){
mkdir -p "$HOME/.local/bin"
ln -sfn "$HERE/common/ascend/bin/ascend-skill" "$HOME/.local/bin/ascend-skill"
bash "$HERE/common/ascend-all/install.sh"
}
TARGET="${1:-all}"
case "$TARGET" in
all|"") exec bash "$HERE/setup.sh" ;;
hazel) bash "$HERE/hazel/setup-hazel.sh"; install_router ;;
ncshare) bash "$HERE/ncshare/setup.sh"; install_router ;;
hurricane) bash "$HERE/hurricane/setup-hurricane.sh"; install_router ;;
colab) bash "$HERE/colab/setup-colab.sh"; install_router ;;
add|custom) bash "$HERE/custom/setup-custom.sh"; install_router ;;
router) install_router ;;
web) bash "$HERE/web/install.sh" ;;
-h|--help|help)
sed -n '2,20p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
*) die "unknown target '$TARGET' (expected: all, hazel, ncshare, hurricane, colab, add, router, web)" ;;
esac
. "$HERE/common/ascend/lib/ensure-path.sh"; ascend_ensure_path
if [ "$TARGET" = web ]; then
say "done -- start it from a NEW terminal: ascend-web"
else
say "done -- verify from a NEW terminal: ascend-$TARGET --check (front door: ascend-all)"
fi