This is a basic Django app showing how you could handle long running llm tasks with Celery and Redis. Check out django cookie cutter to figure out where to set environment variables and other config stuff.
Reach out to me personally on Twitter or email if you need more help.
docker-compose -f local.yml up # start all the services
docker compose -f local.yml run --rm django python manage.py shell # open up a shell