chatbot_tutorial icon indicating copy to clipboard operation
chatbot_tutorial copied to clipboard

Docker image fails to build due to multiple issues. (potential fix included)

Open buddhafinger opened this issue 7 years ago • 1 comments

Scenario 1:

#cmd from repo root: docker build -t deepqa:latest .

Issue encountered: FileNotFoundError: [Errno 2] No such file or directory: '/root/DeepQA/chatbot_website/logs/debug_chatbot.log'

resolved by: mkdir chatbot_website/logs

Which then opened up scenario 2...

Scenario 2: (now with created logs dir)

#cmd from repo root: docker build -t deepqa:latest .

Issue encountered: ImportError: No module named 'asgiref.sync' The command '/bin/sh -c python3 manage.py makemigrations' returned a non-zero code: 1

resolved by: updated Dockerfile from: << 11 pip3 install -U nltk
12 tqdm
13 django
14 asgi_redis
15 channels &&
16 python3 -m nltk.downloader punkt

To

<< 11 pip3 install -U nltk
12 tqdm
13 django
14 asgi_redis
15 channels
16 asgiref &&
17 python3 -m nltk.downloader punkt

End result docker build -t deepqa:latest .

Now builds successfully.

Disclaimer: This is new ground for me, I'm not familiar with this codebase or djagno, channels or asgiref, potential fix was achieved through instinct - please validate with ||Source||

Hope the above helps.

buddhafinger avatar Jun 14 '18 10:06 buddhafinger

There were quite a few more issues encountered to get this working - I've created a kubernetes poc which pulls a working docker container with pre-trained dataset. https://github.com/buddhafinger/deepqa

buddhafinger avatar Jun 18 '18 11:06 buddhafinger