A Django-based service for orchestrating computer vision model inference jobs using Celery and Redis. This project is containerized with Docker and provides REST API endpoints for inference job management.
- Django 5.2 backend with REST API (using Django REST Framework)
- Asynchronous job processing with Celery and Redis
- Containerized with Docker and Docker Compose
- Gunicorn for production-ready serving
- Docker & Docker Compose
- Python 3.11 (if running locally)
-
Clone this repository:
git clone <repo-url> cd orchestrator
-
Create a
.envfile with the following variables:VT_API_URL=<your_vt_api_url> VT_API_TOKEN=<your_vt_api_token> DJANGO_SECRET_KEY=<your_secret_key> DJANGO_DEBUG=1
-
Build and start the services:
docker-compose up --build
This will start:
- Django web server (on port 8001)
- Celery worker
- Redis
-
The API will be available at
http://localhost:69/
- POST /enqueue/
- Enqueue a new vision model job.
- Example payload:
{ "job_id": "<uuid>", "vision_model_id": 1, "input_image_url": "http://.../file.png" }
core/– Django app with tasks, views, and business logicorchestrator/– Django project settings and configurationDockerfile,docker-compose.yml– Containerizationrequirements.txt– Python dependencies