Easy deployment with Docker Compose - just mount your models directory and go!
- Create your models directory:
mkdir models- Download some models:
# Example: Download a small model
curl -L "https://huggingface.co/microsoft/Phi-3-mini-4k-instruct-gguf/resolve/main/Phi-3-mini-4k-instruct-q4.gguf" -o models/phi-3-mini.gguf- Start Shimmy:
docker-compose up -d- Test the API:
curl http://localhost:11434/v1/models| Variable | Default | Description |
|---|---|---|
SHIMMY_PORT |
11434 |
Server port |
SHIMMY_HOST |
0.0.0.0 |
Listen address |
SHIMMY_BASE_GGUF |
/app/models |
Models directory |
./models:/app/models- Mount your local models directoryshimmy-cache:/root/.cache- Persistent cache for downloads
For NVIDIA GPU support, ensure you have:
- NVIDIA Container Toolkit installed
- Docker Compose v2.3+ with GPU support
GPU access is automatically configured in the provided docker-compose.yml.
# Start server
docker-compose up -d
# Check logs
docker-compose logs -f shimmy
# Stop server
docker-compose down# docker-compose.override.yml
services:
shimmy:
ports:
- "8080:11434" # Use port 8080 instead
environment:
- SHIMMY_PORT=11434
- SHIMMY_LOG_LEVEL=debug# Your models directory structure
models/
├── phi-3-mini.gguf
├── llama-2-7b.gguf
└── mistral-7b.ggufShimmy will automatically discover and serve all .gguf models in the mounted directory.
Once running, Shimmy provides OpenAI-compatible endpoints:
GET /v1/models- List available modelsPOST /v1/chat/completions- Chat completionsPOST /v1/completions- Text completionsGET /health- Health check
# Check logs
docker-compose logs shimmy
# Check if port is available
netstat -tulpn | grep 11434# Verify models directory is mounted
docker-compose exec shimmy ls -la /app/models
# Check file permissions
ls -la models/# Check NVIDIA runtime
docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi
# Verify Docker Compose GPU config
docker-compose configTo build your own image:
# Build the image
docker build -t shimmy:local .
# Use local image in docker-compose.yml
# Replace: image: ghcr.io/michael-a-kuykendall/shimmy:latest
# With: image: shimmy:local