Error when training using docker

When I train using docker:

docker run -v `pwd`:/app/project -v `pwd`/models/rasa_core:/app/models rasa/rasa_core:latest run python -m rasa_core.train -d project/config/domain.yml -c project/config/policy.yml -s project/data/core -o models

Sometimes I get the following error after the training ends:

OSError: [Errno 16] Device or resource busy: 'models'

Is there a workaround to avoid these? It seems to be like something is claiming the models directory and not letting it free before rasa tries to store the model’s files.

Have you found a solution for this problem yet? I’m having the same problem.

Wat OS and versions are you using?

I have the same issue. When I get that error my model in /models/rasa_core gets deleted and then I retrain the bot and it works.