-
Notifications
You must be signed in to change notification settings - Fork 0
139_ollama_command
Amresh Verma edited this page Jul 29, 2026
·
7 revisions
- This step converts Colab from a normal notebook to Linux terminal mode, where you can run system-level commands.
!pip install colab-xterm
%load_ext colabxterm
%xterm
- Here we install basic tools that help with background processes and file handling.
apt install screen
apt install zstd
To open a second terminal - Screen
To redirect to the main terminal - Ctrl + A + D. MAc ---> Ctrl+A
- In this step, you install Ollama and start its server to run the AI models.
curl -fsSL https://ollama.com/install.sh | sh
ollama serve
- Here, you download the model, run it directly, and interact with it.
ollama pull qwen3.5:9b
ollama run qwen3.5:9b --verbose
open tunnel
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 chmod +x cloudflared-linux-amd64 mv cloudflared-linux-amd64 /usr/local/bin/cloudflared
cloudflared --version
cloudflared tunnel --url http://localhost:11434
nohup bash -c 'OLLAMA_HOST=0.0.0.0:11434 ollama serve' > ollama.log 2>&1 &
pkill ollama