-
-
Notifications
You must be signed in to change notification settings - Fork 100
Deployment
Joe Curlee (w4ffl35) edited this page Nov 29, 2025
·
1 revision
Guide for deploying AI Runner in various configurations.
# Install with all features
pip install airunner[all]
# Download models
airunner-setup
# Launch
airunnercurl -sSL https://raw.githubusercontent.com/Capsize-Games/airunner/develop/install.sh | bashThe script:
- Checks Python 3.13+ and CUDA
- Creates isolated virtual environment
- Installs PyTorch with GPU support
- Creates launcher scripts in ~/.local/bin
# Run with GPU support
docker run -it --gpus all \
-v ~/.local/share/airunner:/data \
-p 8188:8188 \
capsizegames/airunnerRun AI Runner as a background service for API access.
airunner-headless --port 8188- Copy service file:
sudo cp deployment/systemd/airunner-headless.service /etc/systemd/system/- Edit configuration:
sudo nano /etc/systemd/system/airunner-headless.serviceUpdate paths:
[Service]
User=your_username
Group=your_group
WorkingDirectory=/path/to/airunner
ExecStart=/path/to/venv/bin/python -m airunner.bin.airunner_headless --port 8188- Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable airunner-headless
sudo systemctl start airunner-headless# Check status
sudo systemctl status airunner-headless
# View logs
sudo journalctl -u airunner-headless -f
# Restart
sudo systemctl restart airunner-headless
# Stop
sudo systemctl stop airunner-headlessAI Runner includes a FastAPI server for HTTP access.
airunner-service --host 0.0.0.0 --port 8188| Endpoint | Method | Description |
|---|---|---|
/llm/generate |
POST | Generate text |
/llm/chat |
POST | Chat completion |
/image/generate |
POST | Generate image |
/tts/speak |
POST | Text to speech |
/health |
GET | Health check |
curl -X POST http://localhost:8188/llm/generate \
-H "Content-Type: application/json" \
-d '{"prompt": "Hello, how are you?"}'Example nginx configuration:
server {
listen 80;
server_name ai.example.com;
location / {
proxy_pass http://localhost:8188;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}| Variable | Description | Default |
|---|---|---|
AIRUNNER_DATA_DIR |
Data directory | ~/.local/share/airunner |
AIRUNNER_LOG_LEVEL |
Log level | INFO |
AIRUNNER_HOST |
API host | 127.0.0.1 |
AIRUNNER_PORT |
API port | 8188 |
PYTORCH_CUDA_ALLOC_CONF |
PyTorch memory config | expandable_segments:True |
- 8GB RAM
- 4GB VRAM (for small models)
- 20GB disk space
- 16GB+ RAM
- 12GB+ VRAM (RTX 3060 or better)
- 100GB+ SSD storage
- CUDA-capable NVIDIA GPU
- Check logs:
journalctl -u airunner-headless -n 50 - Verify paths in service file
- Check Python environment activation
- Ensure port isn't in use
- Verify NVIDIA drivers:
nvidia-smi - Check CUDA installation
- Ensure PyTorch has CUDA:
python -c "import torch; print(torch.cuda.is_available())"
- Use smaller model or quantization
- Reduce batch size
- Enable memory efficient attention
- Check
PYTORCH_CUDA_ALLOC_CONF
- Installation - Detailed setup
- Settings - Configuration options
- Architecture - System design