Docker Quick Start
Get started with Antarys vector database using Docker in minutes. Run locally with optimized performance for ARM64 and x86-64 architectures.
Docker Quick Start
Get Antarys vector database running locally with Docker in under 2 minutes.
Optimized Builds: Our Docker images are optimized with SIMD vectorization and architecture-specific compiler flags for maximum performance on both ARM64 and x86-64.
Prerequisites
- Docker installed (Get Docker)
- 2GB available memory
- Port 8080 available (or choose a different port)
Quick Start
Pull and Run
The fastest way to get started:
docker pull antarys/antarys:latest
docker run -d -p 8080:8080 --name antarys antarys/antarys:latestThat's it! Antarys is now running at http://localhost:8080
Verify Installation
Check that Antarys is running:
curl http://localhost:8080/healthInstallation Methods
Production Setup
Run with persistent storage and optimized settings
Python Integration
Connect with the Python client
Configuration
Customize Antarys for your needs
Production Setup
Pull the Image
docker pull antarys/antarys:latestMulti-Architecture: The image automatically selects the optimized build for your platform (ARM64 or x86-64).
Create Persistent Storage
# Create a named volume for data persistence
docker volume create antarys-dataRun with Production Settings
docker run -d \
--name antarys \
--restart unless-stopped \
-p 8080:8080 \
-v antarys-data:/app/data \
-e CACHE_SIZE=419430400 \
-e POOL_SIZE=200 \
antarys/antarys:latestConfiguration:
--restart unless-stopped- Auto-restart on system reboot-v antarys-data:/app/data- Persist data between restarts-e CACHE_SIZE=419430400- Set cache to 400MB-e POOL_SIZE=200- Set connection pool size
Verify Health
# Check health endpoint
curl http://localhost:8080/health
# View logs
docker logs -f antarysDocker Compose
For easier management, use Docker Compose:
version: '3.8'
services:
antarys:
image: antarys/antarys:latest
container_name: antarys
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- antarys-data:/app/data
environment:
- DB_PATH=/app/data
- CACHE_SIZE=419430400
- POOL_SIZE=200
- PORT=8080
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
volumes:
antarys-data:
driver: local# Start Antarys
docker compose up -d
# View logs
docker compose logs -f antarys
# Stop Antarys
docker compose down
# Stop and remove data
docker compose down -vConfiguration Options
Customize Antarys using environment variables:
docker run -d \
--name antarys \
-p 8080:8080 \
-v antarys-data:/app/data \
-e PORT=8080 \
-e DB_PATH=/app/data \
antarys/antarys:latest| Variable | Description | Default |
|---|---|---|
PORT | API server port | 8080 |
DB_PATH | Data directory path | /app/data |
docker run -d \
--name antarys \
-p 8080:8080 \
-v antarys-data:/app/data \
-e CACHE_SIZE=209715200 \
-e POOL_SIZE=100 \
-e LOG_LEVEL=info \
antarys/antarys:latest| Variable | Description | Default |
|---|---|---|
CACHE_SIZE | Cache size in bytes | 209715200 (200MB) |
POOL_SIZE | Connection pool size | 100 |
LOG_LEVEL | Logging level | info |
docker run -d \
--name antarys \
-p 8080:8080 \
-v antarys-data:/app/data \
--memory="4g" \
--cpus="4" \
-e CACHE_SIZE=1073741824 \
-e POOL_SIZE=500 \
-e GOMAXPROCS=4 \
antarys/antarys:latest| Variable | Description | Recommended |
|---|---|---|
--memory | Memory limit | 2-8GB |
--cpus | CPU limit | 2-8 cores |
CACHE_SIZE | Cache size | 1GB for production |
POOL_SIZE | Pool size | 200-500 |
GOMAXPROCS | Go max threads | Match CPU count |
More Options: See the Engine Reference for complete configuration details.
Python Quick Start
Install Python Client
pip install antarysConnect and Use
from antarys import Antarys
# Connect to your Docker instance
client = Antarys(url="http://localhost:8080")
# Create a collection
collection = client.create_collection(
name="my_vectors",
dimension=384
)
# Insert vectors
vectors = [
{"id": "1", "vector": [0.1, 0.2, ...], "metadata": {"text": "Hello"}},
{"id": "2", "vector": [0.3, 0.4, ...], "metadata": {"text": "World"}}
]
collection.insert(vectors)
# Search
results = collection.search(
vector=[0.1, 0.2, ...],
top_k=5
)
print(results)Complete Example
from antarys import Antarys
import numpy as np
# Initialize client
client = Antarys(url="http://localhost:8080")
# Create collection with metadata schema
collection = client.create_collection(
name="documents",
dimension=768,
metadata_schema={
"title": "string",
"category": "string",
"timestamp": "integer"
}
)
# Generate sample embeddings
def generate_embedding():
return np.random.rand(768).tolist()
# Insert documents with embeddings
documents = [
{
"id": "doc1",
"vector": generate_embedding(),
"metadata": {
"title": "Introduction to AI",
"category": "technology",
"timestamp": 1699564800
}
},
{
"id": "doc2",
"vector": generate_embedding(),
"metadata": {
"title": "Machine Learning Basics",
"category": "technology",
"timestamp": 1699651200
}
}
]
collection.insert(documents)
# Search with filters
query_vector = generate_embedding()
results = collection.search(
vector=query_vector,
top_k=10,
filter={"category": "technology"}
)
# Display results
for result in results:
print(f"ID: {result['id']}")
print(f"Score: {result['score']}")
print(f"Metadata: {result['metadata']}")
print("---")Learn More: Check out the Python SDK documentation for advanced usage and examples.
Management Commands
# Start Antarys
docker start antarys
# Stop Antarys
docker stop antarys
# Restart Antarys
docker restart antarys
# Remove container (keeps data)
docker rm antarys
# Remove container and data
docker rm -v antarys# Backup data volume
docker run --rm \
-v antarys-data:/data \
-v $(pwd):/backup \
alpine tar czf /backup/antarys-backup.tar.gz -C /data .
# Restore data volume
docker run --rm \
-v antarys-data:/data \
-v $(pwd):/backup \
alpine tar xzf /backup/antarys-backup.tar.gz -C /data
# View data size
docker system df -v | grep antarys-data# View logs
docker logs antarys
# Follow logs in real-time
docker logs -f antarys
# View last 100 lines
docker logs --tail 100 antarys
# Check resource usage
docker stats antarys
# Inspect container
docker inspect antarysTroubleshooting
Port Already in Use
If port 8080 is busy, use a different port:
docker run -d -p 8081:8080 --name antarys antarys/antarys:latestThen connect to http://localhost:8081
Container Won't Start
Check the logs:
docker logs antarysCommon issues:
- Insufficient memory (increase with
--memory="4g") - Permission issues (check volume permissions)
- Port conflicts (change host port)
Connection Refused
Verify the container is running:
# Check status
docker ps -a | grep antarys
# Test from inside container
docker exec antarys curl http://localhost:8080/healthReset Everything
Start fresh:
# Stop and remove container
docker stop antarys
docker rm antarys
# Remove data volume
docker volume rm antarys-data
# Pull latest image
docker pull antarys/antarys:latest
# Start fresh
docker run -d -p 8080:8080 --name antarys antarys/antarys:latestPerformance Tips
Optimized Builds: Our Docker images include architecture-specific optimizations:
- x86-64: AVX2, FMA, SSE4.2 SIMD instructions
- ARM64: NEON, Crypto extensions, FP16 support
Resource Allocation
# For production workloads
docker run -d \
--name antarys \
--memory="8g" \
--memory-swap="8g" \
--cpus="4" \
--cpu-shares="1024" \
-p 8080:8080 \
-v antarys-data:/app/data \
-e CACHE_SIZE=2147483648 \
-e POOL_SIZE=500 \
-e GOMAXPROCS=4 \
antarys/antarys:latestDocker Compose with Resources
services:
antarys:
image: antarys/antarys:latest
deploy:
resources:
limits:
cpus: '4'
memory: 8G
reservations:
cpus: '2'
memory: 4GNext Steps
Python SDK
Install and use the Python client library
Node.js SDK
Install and use the Node.js/TypeScript client
Engine Reference
Complete API and configuration reference
Examples
Explore practical examples and tutorials
Resources
- Docker Hub: hub.docker.com/r/antarys/antarys
- Documentation: docs.antarys.ai
- GitHub: github.com/antarys-ai
- Discord: Join our community