[Python] Managing dependency conflicts in ubuntu docker python script

Discussão em 'Python' iniciado por Stack, Abril 17, 2025.

  1. Stack

    Stack Membro Participativo

    I am building a simple chatbot, within an Ubuntu docker image, which runs a websocket server in a main program asyncio loop and from within that loop needs to fluidly call and execute text-to-speech models like Coqui XTTS and speech-to-text models like NeMo fastconformer or parakeet asynchronously. The trouble I'm running into is that my environment is now becoming complex enough that different packages have conflicting dependencies: for example Coqui requires transformers version 4.35.2 while certain NeMo tools require transformers >= 4.41.0 or they will break. I have read about using venv for isolating python dependencies between different projects, but what do you do when you have conflicting dependencies within the same project and need to use packages with conflicting dependencies within the same script? Is there a simple solution to this that I am overlooking (short of ChatGPT's solution of redesigning my entire workflow as a collection of microservices communicating in a docker swarm)?

    Continue reading...

Compartilhe esta Página