Complete guide for deploying the Mohawk Inference Engine GUI to production environments on Windows, Linux, and macOS.
- Quick Deploy Options
- Windows Deployment
- Linux Deployment
- macOS Deployment
- Docker Deployment
- Cloud Deployment
- Security Hardening
- Monitoring & Logging
- Troubleshooting
Windows:
build_windows.bat
copy dist\Mohawk*-Inference-Engine.exe C:\Program Files\Mohawk\
C:\Program Files\Mohawk\Mohawk-Inference-Engine.exe --host localhost --port 8003Linux:
./build_linux.sh
cp dist/Mohawk*-Inference-Engine /usr/local/bin/
Mohawk-Inference-Engine --host localhost --port 8003docker-compose up -dpip install .
mohawk-gui --host localhost --port 8003- Windows 10/11 (64-bit)
- Python 3.10+ installed
- NVIDIA GPU drivers (for GPU inference)
- Docker Desktop (optional, for containerized deployment)
# Clone or navigate to repository
cd C:\Users\rwill\Mohawk-Inference-Engine
# Create virtual environment
python -m venv venv
venv\Scripts\activate
# Install production dependencies
pip install -r requirements.txtmkdir -p certs
python mohawk_gui/main.py --key-file certs/auth_key.pembuild_windows.batThe executable will be created at dist\Mohawk*-Inference-Engine.exe
# Create installation directory
mkdir C:\Program Files\Mohawk
# Copy executable
copy dist\Mohawk*-Inference-Engine.exe "C:\Program Files\Mohawk\Mohawk-Inference-Engine.exe"
# Copy resources if needed
xcopy mohawk_gui\resources "C:\Program Files\Mohawk\resources\" /E /I /Y
# Create logs directory
mkdir C:\Program Files\Mohawk\logs# Create shortcut
$shortcut = [System.Windows.Shell.ApplicationActivationState]::Active
Add-AppxPackage -Path "C:\Program Files\Mohawk\Mohawk-Inference-Engine.exe"Or manually create shortcut:
- Right-click on Desktop → New → Shortcut
- Browse to
C:\Program Files\Mohawk\Mohawk-Inference-Engine.exe - Add arguments:
--host localhost --port 8003
# Allow GUI through firewall
New-NetFirewallRule -DisplayName "Mohawk Inference Engine GUI" `
-Direction Inbound `
-Protocol TCP `
-LocalPort 8003,8443 `
-Action AllowCreate C:\Program Files\Mohawk\MohawkService.svc:
@echo off
REM Mohawk Inference Engine Windows Service
set MOHAWK_INSTALL_DIR=C:\Program Files\Mohawk
set MOHAWK_EXE=%MOHAWK_INSTALL_DIR%\Mohawk-Inference-Engine.exe
set MOHAWK_LOGS=%MOHAWK_INSTALL_DIR%\logs
%MOHAWK_EXE% --host 0.0.0.0 --port 8003 > %MOHAWK_LOGS\service.log 2>&1Register as Windows Service:
sc create MohawkInference binPath="C:\Program Files\Mohawk\MohawkService.svc" start=auto
sc start MohawkInference- Ubuntu 20.04/22.04 LTS or RHEL/CentOS 8+
- Python 3.10+ installed
- NVIDIA drivers (for GPU inference)
- Docker (optional, for containerized deployment)
# Update system
sudo apt update && sudo apt upgrade -y
# Install system dependencies
sudo apt install -y \
python3.11 \
python3.11-venv \
python3-pip \
libgl1-mesa-glx \
libxkbcommon-x11-0 \
libdbus-1-3
# Create project directory
mkdir -p /opt/mohawk
cd /opt/mohawk
# Clone or copy repository
git clone https://github.com/your-org/mohawk-inference-engine.git .
# Create virtual environment
python3.11 -m venv venv
source venv/bin/activate
# Install production dependencies
pip install -r requirements.txtmkdir -p /opt/mohawk/certs
python mohawk_gui/main.py --key-file certs/auth_key.pem./build_linux.shThe executable will be created at dist/Mohawk*-Inference-Engine
# Copy executable to system path
sudo cp dist/Mohawk*-Inference-Engine /usr/local/bin/
# Make it executable
sudo chmod +x /usr/local/bin/Mohawk-Inference-Engine
# Create logs directory
sudo mkdir -p /var/log/mohawk
sudo chown root:root /var/log/mohawkCreate /etc/systemd/system/mohawk-gui.service:
[Unit]
Description=Mohawk Inference Engine GUI
After=network.target nvidia-driver.service
[Service]
Type=simple
User=mohawk
Group=mohawk
WorkingDirectory=/opt/mohawk
Environment="PYTHONPATH=/opt/mohawk"
ExecStart=/opt/mohawk/venv/bin/python /opt/mohawk/dist/Mohawk-Inference-Engine \
--host 0.0.0.0 \
--port 8003 \
--key-file /opt/mohawk/certs/auth_key.pem
Restart=on-failure
RestartSec=10
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.targetsudo systemctl daemon-reload
sudo systemctl enable mohawk-gui
sudo systemctl start mohawk-gui
# Check status
sudo systemctl status mohawk-gui
# View logs
sudo journalctl -u mohawk-gui -fsudo ufw allow 8003/tcp
sudo ufw allow 8443/tcp- macOS 12+ (Monterey or later)
- Python 3.10+ installed
- Docker Desktop for Mac (optional)
# Create project directory
mkdir -p ~/Projects/mohawk-inference-engine
cd ~/Projects/mohawk-inference-engine
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install production dependencies
pip install -r requirements.txtmkdir -p certs
python mohawk_gui/main.py --key-file certs/auth_key.pem./build_linux.sh # Works on macOS too, or use pyinstaller directlycp dist/Mohawk*-Inference-Engine ~/Applications/
chmod +x ~/Applications/Mohawk-Inference-Engine
ln -s ~/Applications/Mohawk-Inference-Engine /Applications/Mohawk\ Inference\ Engine.app# Add to login items
defaults write com.apple.loginitems Automate -array \
"/Applications/Mohawk Inference Engine.app"
defaults write com.apple.loginitems EnableRunningApps -bool true# Build and run both GUI and worker
docker-compose up -d
# Check status
docker-compose ps
# View logs
docker-compose logs -f mohawk-gui# Build custom image
docker build -t mohawk-gui:latest .
# Run with custom configuration
docker run -d \
--name mohawk-gui \
--gpus all \
-p 8003:8003 \
-p 8443:8443 \
-v $(pwd)/certs:/app/certs:ro \
-v $(pwd)/logs:/app/logs \
-e HOST=0.0.0.0 \
-e PORT=8003 \
-e SSL_ENABLED=true \
mohawk-gui:latestCreate kubernetes/mohawk-gui-deployment.yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: mohawk-gui
spec:
replicas: 1
selector:
matchLabels:
app: mohawk-gui
template:
metadata:
labels:
app: mohawk-gui
spec:
containers:
- name: mohawk-gui
image: your-registry/mohawk-gui:latest
ports:
- containerPort: 8003
- containerPort: 8443
env:
- name: HOST
value: "0.0.0.0"
- name: PORT
value: "8003"
volumeMounts:
- name: certs
mountPath: /app/certs
- name: logs
mountPath: /app/logs
volumes:
- name: certs
hostPath:
path: /path/to/certs
type: Directory
- name: logs
emptyDir: {}# Launch EC2 instance with Ubuntu 22.04
# Security group: Allow ports 8003, 8443
# Connect via SSH
ssh -i your-key.pem ec2-user@your-instance-ip
# Deploy (follow Linux deployment steps above)
./build_linux.sh
sudo systemctl start mohawk-gui# Build Docker image
docker build -t mohawk-gui:latest .
# Push to ECR
aws ecr create-repository --repository-name mohawk-gui
aws ecr get-login-password | docker login --username AWS --password-stdin <account-id>.dkr.ecr.<region>.amazonaws.com
docker push <account-id>.dkr.ecr.<region>.amazonaws.com/mohawk-gui:latest
# Create ECS task definition and service
# Configure with Fargate or EC2 launch type# Launch Azure VM with Ubuntu 22.04
# Deploy using Linux deployment steps
# Or use Azure Container Instances
az container create \
--name mohawk-gui \
--resource-group myResourceGroup \
--image your-registry/mohawk-gui:latest \
--dns-name-label mohawk-gui \
--ports 8003 8443# Build and push to Container Registry
gcr.io/cloud-builders/docker build -t gcr.io/PROJECT_ID/mohawk-gui:latest .
gcloud containers images push gcr.io/PROJECT_ID/mohawk-gui:latest
# Deploy to Cloud Run
gcloud run deploy mohawk-gui \
--image gcr.io/PROJECT_ID/mohawk-gui:latest \
--platform managed \
--region us-central1 \
--allow-unauthenticated# Generate self-signed certificates (for testing)
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout certs/server.key \
-out certs/server.crt \
-subj "/C=US/ST=State/L=City/O=Organization/CN=localhost"
# Or use Let's Encrypt for production
certbot certonly --standalone -d your-domain.comLinux (ufw):
sudo ufw deny 8003/tcp # Deny by default
sudo ufw allow from 10.0.0.0/8 to any port 8003 proto tcp # Allow internal only
sudo ufw allow from your-ip to any port 8003 proto tcp # Allow specific IPWindows:
# Only allow trusted IPs
New-NetFirewallRule -DisplayName "Mohawk Inference Engine" `
-Direction Inbound `
-Protocol TCP `
-LocalPort 8003 `
-Action Allow `
-RemoteAddress 10.0.0.0/8# In systemd service file
User=mohawk
Group=mohawkEdit config.toml:
[logging]
level = "INFO"
file = "/var/log/mohawk/audit.log"
format = "json"
[security]
audit_enabled = true# Linux: Update system and dependencies
sudo apt update && sudo apt upgrade -y
# Check for vulnerabilities
pip install safety
safety check --full-reportLinux:
# View logs
sudo tail -f /var/log/mohawk/mohawk_gui.log
# Or use journalctl
sudo journalctl -u mohawk-gui -fWindows:
Get-Content "C:\Program Files\Mohawk\logs\mohawk_gui.log" -Tail -Waitdocker-compose logs -f mohawk-guiAdd to config.toml:
[metrics]
export_interval_s = 60
enable_prometheus = true
prometheus_port = 9090Configure metrics endpoint and add Grafana dashboard for visualization.
Solution:
# Linux
source venv/bin/activate
pip install -e .
# Or reinstall
pip install -r requirements.txtSolution:
# Install system dependencies
sudo apt install libgl1-mesa-glx libxkbcommon-x11-0 libdbus-1-3
# Or for Windows, ensure OpenGL drivers are installedSolution:
# Check GPU detection
nvidia-smi
# Install CUDA-enabled dependencies
pip install torch --index-url https://download.pytorch.org/whl/cu118Solution:
# Check logs
docker-compose logs mohawk-gui
# Ensure GPU drivers are installed
nvidia-smi
# Rebuild image
docker-compose build --no-cacheRun with verbose logging:
python mohawk_gui/main.py --host localhost --port 8003 --log-level DEBUGBefore deploying to production:
- Generate authentication key (
certs/auth_key.pem) - Configure SSL/TLS certificates (production)
- Set up firewall rules (allow only trusted IPs)
- Configure systemd service (Linux) or Windows service
- Enable audit logging
- Test connection to worker endpoints
- Verify GPU detection (
nvidia-smi) - Check memory and CPU resources
- Set up monitoring and alerting
- Document deployment configuration
For deployment issues:
- Check logs:
journalctl -u mohawk-gui -f(Linux) or event viewer (Windows) - Review documentation in repository
- Open issue on GitHub with error details
Mohawk Inference Engine v2.1.0 - Production Deployment Ready! 🚀