Created
April 15, 2025 01:34
-
-
Save tristanperalta/6640d00eabe3baa1821591ac6a601148 to your computer and use it in GitHub Desktop.
Run ollama and open-webui bash script in tmux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
python_env=$(asdf where python 3.11.12) | |
openwebui=$python_env/bin/open-webui | |
session="ollama" | |
tmux has-session -t $session 2>/dev/null | |
if [ $? != 0 ]; then | |
tmux new-session -d -s $session | |
tmux select-pane -t $session:0.0 | |
tmux send-keys "ollama run deepseek-r1:14b" C-m | |
tmux split-window -t $session | |
tmux select-pane -t $session:0.1 | |
tmux send-keys "cd /mnt/1f352e4d-28cd-4b89-b191-65c8266fdf51/pips/open-webui" C-m | |
tmux send-keys "source ./bin/activate" C-m | |
tmux send-keys "$openwebui serve" C-m | |
fi | |
# Attach to created session | |
tmux attach-session -t $session |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment