Repository navigation
Expand file tree
/
Copy pathinstall.sh
More file actions
73 lines (63 loc) · 1.89 KB
/
Copy pathinstall.sh
File metadata and controls
73 lines (63 loc) · 1.89 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
66
67
68
69
70
71
72
73
#!/usr/bin/env bash
# dLLM Runner installer - downloads the latest release for your platform
# Usage: curl -fsSL https://raw.githubusercontent.com/YOUR_USER/dllm-runner/main/install.sh | bash
set -euo pipefail
REPO="YOUR_USER/dllm-runner"
INSTALL_DIR="/opt/dllm"
# Detect platform
OS="$(uname -s)"
ARCH="$(uname -m)"
case "$OS" in
Linux)
case "$ARCH" in
x86_64) ARCHIVE="dllm-linux-x86_64.tar.gz" ;;
aarch64) ARCHIVE="dllm-linux-aarch64.tar.gz" ;;
*) echo "Unsupported arch: $ARCH"; exit 1 ;;
esac
;;
Darwin)
case "$ARCH" in
x86_64) ARCHIVE="dllm-macos-x86_64.tar.gz" ;;
arm64) ARCHIVE="dllm-macos-aarch64.tar.gz" ;;
*) echo "Unsupported arch: $ARCH"; exit 1 ;;
esac
;;
*)
echo "Unsupported OS: $OS (use Windows .zip from GitHub Releases)"
exit 1
;;
esac
echo "🌀 Installing dLLM Runner..."
echo " Platform: $OS $ARCH"
echo " Archive: $ARCHIVE"
echo ""
# Get latest release URL
LATEST_URL=$(curl -fsSL "https://api.github.com/repos/$REPO/releases/latest" \
| grep "browser_download_url.*$ARCHIVE" \
| cut -d '"' -f 4)
if [ -z "$LATEST_URL" ]; then
echo "Error: Could not find release for $ARCHIVE"
echo "Check https://github.com/$REPO/releases"
exit 1
fi
# Download and extract
TMPDIR=$(mktemp -d)
echo "⬇ Downloading $LATEST_URL..."
curl -fsSL "$LATEST_URL" -o "$TMPDIR/$ARCHIVE"
echo "📦 Installing to $INSTALL_DIR..."
sudo mkdir -p "$INSTALL_DIR"
sudo tar xzf "$TMPDIR/$ARCHIVE" -C "$INSTALL_DIR"
sudo chmod +x "$INSTALL_DIR/dllm"
rm -rf "$TMPDIR"
# Symlink
if [ -d "/usr/local/bin" ]; then
sudo ln -sf "$INSTALL_DIR/dllm" /usr/local/bin/dllm
echo "🔗 Symlinked to /usr/local/bin/dllm"
fi
echo ""
echo "✓ dLLM Runner installed!"
echo ""
echo "Next steps:"
echo " dllm setup # Install Python deps (~3GB)"
echo " dllm run dream-7b --quantize 4bit # Start chatting!"
echo ""