I have a celery task that uses torch library, which internally uses CUDA. When I run the task, it fails saying "Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method"
When I browsed on this a little, I got this - https://github.com/celery/celery/issues/6036 This issue says Celery supports only fork and not spawn.
Is there any workaround/alternative to this?