# 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 ```bash # 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 ```bash # 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 ```bash # 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: ```bash # 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`): ```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](installation.md) - Detailed setup options - [First Experiment](first-experiment.md) - Complete ML workflow - [Development Setup](development-setup.md) - Local development - [Security](security.md) - Authentication and permissions ## Troubleshooting **Services not starting?** ```bash # Check logs docker-compose logs # Restart services docker-compose down && docker-compose up -d (testing only) ``` **API not responding?** ```bash # Check health curl http://localhost:9101/health # Verify ports docker-compose ps ``` **Permission denied?** ```bash # Check API key curl -H "X-API-Key: admin" http://localhost:9101/api/v1/jobs ```