...
This commit is contained in:
		
							
								
								
									
										0
									
								
								examples/tmuxrunnerexamples/tasks/1/.meta.toml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								examples/tmuxrunnerexamples/tasks/1/.meta.toml
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										10
									
								
								examples/tmuxrunnerexamples/tasks/1/base_tools.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										10
									
								
								examples/tmuxrunnerexamples/tasks/1/base_tools.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
set -euo pipefail
 | 
			
		||||
source ../../functions/base.sh
 | 
			
		||||
 | 
			
		||||
apt update
 | 
			
		||||
apt upgrade -y 
 | 
			
		||||
apt install -y tmux btop nvtop psutils htop
 | 
			
		||||
 | 
			
		||||
mark_done
 | 
			
		||||
							
								
								
									
										57
									
								
								examples/tmuxrunnerexamples/tasks/1/tmux_config.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										57
									
								
								examples/tmuxrunnerexamples/tasks/1/tmux_config.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,57 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
set -euo pipefail
 | 
			
		||||
source source ../../functions/base.sh
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# --- create ~/.tmux.conf ---
 | 
			
		||||
TMUX_CONF="$HOME/.tmux.conf"
 | 
			
		||||
 | 
			
		||||
cat > "$TMUX_CONF" <<'EOF'
 | 
			
		||||
# ~/.tmux.conf
 | 
			
		||||
 | 
			
		||||
# Enable mouse support (scroll, resize, select panes/windows)
 | 
			
		||||
set -g mouse on
 | 
			
		||||
 | 
			
		||||
# Use the mouse wheel to scroll in copy mode automatically
 | 
			
		||||
bind -T root WheelUpPane if-shell -F -t = "#{mouse_any_flag}" \
 | 
			
		||||
    "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
 | 
			
		||||
 | 
			
		||||
# Allow resizing panes by dragging borders
 | 
			
		||||
setw -g aggressive-resize on
 | 
			
		||||
 | 
			
		||||
# Easier navigation in copy mode
 | 
			
		||||
setw -g mode-keys vi
 | 
			
		||||
 | 
			
		||||
# Status bar improvements
 | 
			
		||||
set -g status-bg black
 | 
			
		||||
set -g status-fg green
 | 
			
		||||
set -g status-left-length 40
 | 
			
		||||
set -g status-left '#S '
 | 
			
		||||
set -g status-right '#(whoami)@#H %Y-%m-%d %H:%M'
 | 
			
		||||
 | 
			
		||||
# Pane borders more visible
 | 
			
		||||
set -g pane-border-style fg=cyan
 | 
			
		||||
set -g pane-active-border-style fg=yellow
 | 
			
		||||
 | 
			
		||||
# Reload config quickly
 | 
			
		||||
bind r source-file ~/.tmux.conf \; display-message "Reloaded tmux.conf"
 | 
			
		||||
 | 
			
		||||
# Use system clipboard on macOS
 | 
			
		||||
if-shell "command -v pbcopy >/dev/null 2>&1" \
 | 
			
		||||
    "bind -T copy-mode-vi y send -X copy-pipe-and-cancel 'pbcopy'" \
 | 
			
		||||
    "bind -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -selection clipboard -in'"
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
echo "✅ Wrote $TMUX_CONF"
 | 
			
		||||
 | 
			
		||||
# --- apply config if tmux is running ---
 | 
			
		||||
if pgrep -x tmux >/dev/null 2>&1; then
 | 
			
		||||
    echo "🔄 Reloading tmux config..."
 | 
			
		||||
    tmux source-file "$TMUX_CONF"
 | 
			
		||||
else
 | 
			
		||||
    echo "ℹ️ tmux is not running yet. Config will apply on next start."
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
mark_done
 | 
			
		||||
							
								
								
									
										42
									
								
								examples/tmuxrunnerexamples/tasks/2/install_ollama.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								examples/tmuxrunnerexamples/tasks/2/install_ollama.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,42 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
set -euo pipefail
 | 
			
		||||
source source ../../functions/base.sh
 | 
			
		||||
 | 
			
		||||
mark_done
 | 
			
		||||
 | 
			
		||||
exit 0
 | 
			
		||||
 | 
			
		||||
URL="https://github.com/ollama/ollama/releases/download/v0.11.6/ollama-linux-amd64.tgz"
 | 
			
		||||
TGZ="/tmp/ollama.tgz"
 | 
			
		||||
INSTALL_PATH="/usr/bin/ollama"
 | 
			
		||||
 | 
			
		||||
echo "[*] Checking for running ollama serve..."
 | 
			
		||||
if pgrep -x "ollama" > /dev/null; then
 | 
			
		||||
    echo "[*] Stopping running ollama process..."
 | 
			
		||||
    pkill -9 ollama
 | 
			
		||||
    sleep 2
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
echo "[*] Downloading ollama..."
 | 
			
		||||
curl -L "$URL" -o "$TGZ"
 | 
			
		||||
 | 
			
		||||
echo "[*] Extracting..."
 | 
			
		||||
tar -xzf "$TGZ" -C /tmp
 | 
			
		||||
 | 
			
		||||
echo "[*] Installing to $INSTALL_PATH..."
 | 
			
		||||
sudo mv /tmp/ollama "$INSTALL_PATH"
 | 
			
		||||
sudo chmod +x "$INSTALL_PATH"
 | 
			
		||||
 | 
			
		||||
pkill -9 ollama
 | 
			
		||||
 | 
			
		||||
SESSION=$(tmux display-message -p '#S')
 | 
			
		||||
 | 
			
		||||
echo "[*] Using tmux session: $SESSION"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
echo "[*] Started ollama pulls in tmux windows."
 | 
			
		||||
 | 
			
		||||
ollama pull adhishtanaka/llama_3.2_1b-SQL
 | 
			
		||||
 | 
			
		||||
mark_done
 | 
			
		||||
							
								
								
									
										14
									
								
								examples/tmuxrunnerexamples/tasks/2/install_vllm.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								examples/tmuxrunnerexamples/tasks/2/install_vllm.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
set -euo pipefail
 | 
			
		||||
source source ../../functions/base.sh
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# vllm serve openai/gpt-oss-20b
 | 
			
		||||
# vllm serve openai/gpt-oss-20b --tensor-parallel-size 2
 | 
			
		||||
 
 | 
			
		||||
# For 120B
 | 
			
		||||
# vllm serve openai/gpt-oss-120b
 | 
			
		||||
 | 
			
		||||
mark_done
 | 
			
		||||
							
								
								
									
										42
									
								
								examples/tmuxrunnerexamples/tasks/3/vllm.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								examples/tmuxrunnerexamples/tasks/3/vllm.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,42 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
set -euo pipefail
 | 
			
		||||
source source ../../functions/base.sh
 | 
			
		||||
 | 
			
		||||
mark_done
 | 
			
		||||
 | 
			
		||||
exit 0
 | 
			
		||||
 | 
			
		||||
# uv pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121
 | 
			
		||||
# uv pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu128
 | 
			
		||||
 | 
			
		||||
touch "$0.done"
 | 
			
		||||
exit 0
 | 
			
		||||
 | 
			
		||||
uv pip install --pre torch==2.9.0.dev20250804+cu128 \
 | 
			
		||||
  --index-url https://download.pytorch.org/whl/nightly/cu128
 | 
			
		||||
 | 
			
		||||
uv pip install tiktoken ipython numpy psutil
 | 
			
		||||
 | 
			
		||||
# 4. Confirm it's correct
 | 
			
		||||
python -c "import torch; print(torch.__version__, torch.version.cuda)"
 | 
			
		||||
# 2.9.0.dev20250804+cu128 12.8
 | 
			
		||||
 | 
			
		||||
cd /root
 | 
			
		||||
source .venv/bin/activate
 | 
			
		||||
uv pip install --upgrade pip setuptools wheel ninja
 | 
			
		||||
export MAX_JOBS=8
 | 
			
		||||
export TORCH_CUDA_ARCH_LIST="12.0"
 | 
			
		||||
export NCCL_P2P_DISABLE=0
 | 
			
		||||
export NCCL_DEBUG=INFO
 | 
			
		||||
export CUDA_DEVICE_MAX_CONNECTIONS=1
 | 
			
		||||
 | 
			
		||||
pip install flash-attn --no-build-isolation
 | 
			
		||||
 | 
			
		||||
uv pip install --pre vllm==0.10.1+gptoss \
 | 
			
		||||
    --extra-index-url https://wheels.vllm.ai/gpt-oss/ \
 | 
			
		||||
    --extra-index-url https://download.pytorch.org/whl/nightly/cu128 \
 | 
			
		||||
    --index-strategy unsafe-best-match
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
mark_done
 | 
			
		||||
		Reference in New Issue
	
	Block a user