#!/usr/bin/env bash # Clef lokal ausprobieren – Linux # Automatisch erzeugt von Tokenstrom (tokenstrom.de). # Aufruf: bash try_linux.sh set -e cd "$(dirname "$0")" echo "== Clef ==" if command -v nvidia-smi >/dev/null 2>&1; then nvidia-smi --query-gpu=name,memory.total --format=csv,noheader; else echo "Keine NVIDIA-GPU gefunden – läuft auf CPU (langsam)"; fi if true; then echo "== Ollama ==" if ! command -v ollama >/dev/null 2>&1; then curl -fsSL https://ollama.com/install.sh | sh fi curl -s http://localhost:11434/api/tags >/dev/null 2>&1 || (ollama serve >/dev/null 2>&1 &) sleep 3 ollama pull "clef" echo "Starte Chat – beenden mit /bye" exec ollama run "clef" fi