Skip to content

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

@buddhafinger

Description

@buddhafinger

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions