- Fix YAML tags in auth config struct (json -> yaml) - Update CLI configs to use pre-hashed API keys - Remove double hashing in WebSocket client - Fix port mapping (9102 -> 9103) in CLI commands - Update permission keys to use jobs:read, jobs:create, etc. - Clean up all debug logging from CLI and server - All user roles now authenticate correctly: * Admin: Can queue jobs and see all jobs * Researcher: Can queue jobs and see own jobs * Analyst: Can see status (read-only access) Multi-user authentication is now fully functional.
2.7 KiB
2.7 KiB
Quick Start
Get Fetch ML running in minutes with Docker Compose.
Prerequisites
Container Runtimes:
-
Docker Compose: For testing and development only
-
Podman: For production experiment execution
-
Docker Compose (testing only)
-
4GB+ RAM
-
2GB+ disk space
One-Command Setup
# Clone and start
git clone https://github.com/jfraeys/fetch_ml.git
cd fetch_ml
docker-compose up -d (testing only)
# Wait for services (30 seconds)
sleep 30
# Verify setup
curl http://localhost:9101/health
First Experiment
# Submit a simple ML job (see [First Experiment](first-experiment.md) for details)
curl -X POST http://localhost:9101/api/v1/jobs \
-H "Content-Type: application/json" \
-H "X-API-Key: admin" \
-d '{
"job_name": "hello-world",
"args": "--echo Hello World",
"priority": 1
}'
# Check job status
curl http://localhost:9101/api/v1/jobs \
-H "X-API-Key: admin"
CLI Access
# Build CLI
cd cli && zig build dev
# List jobs
./cli/zig-out/dev/ml --server http://localhost:9101 list-jobs
# Submit new job
./cli/zig-out/dev/ml --server http://localhost:9101 submit \
--name "test-job" --args "--epochs 10"
Local Mode (Zero-Install)
Run workers locally without Redis or SSH for development and testing:
# Start a local worker (uses configs/worker-dev.yaml)
./cmd/worker/worker -config configs/worker-dev.yaml
# In another terminal, submit a job to the local worker
curl -X POST http://localhost:9101/api/v1/jobs \
-H "Content-Type: application/json" \
-H "X-API-Key: admin" \
-d '{
"job_name": "local-test",
"args": "--echo Local Mode Works",
"priority": 1
}'
# The worker will execute locally using:
# - Local command execution (no SSH)
# - Local job directories (pending/running/finished)
# - In-memory task queue (no Redis required)
Local mode configuration (configs/worker-dev.yaml):
local_mode: true # Enable local execution
base_path: "./jobs" # Local job directory
redis_addr: "" # Optional: skip Redis
host: "" # Optional: skip SSH
Related Documentation
- Installation Guide - Detailed setup options
- First Experiment - Complete ML workflow
- Development Setup - Local development
- Security - Authentication and permissions
Troubleshooting
Services not starting?
# Check logs
docker-compose logs
# Restart services
docker-compose down && docker-compose up -d (testing only)
API not responding?
# Check health
curl http://localhost:9101/health
# Verify ports
docker-compose ps
Permission denied?
# Check API key
curl -H "X-API-Key: admin" http://localhost:9101/api/v1/jobs