lukalabs / cakechat

CakeChat: Emotional Generative Dialog System
Apache License 2.0
1.7k stars 935 forks source link

ValueError: numpy.ufunc has the wrong size when launching Docker container #55

Closed tmagnussen closed 5 years ago

tmagnussen commented 5 years ago

When starting the Docker container generated with sudo docker build -t cakechat:latest -f dockerfiles/Dockerfile.cpu dockerfiles/

Then running "python tools/download_model.py" inside the container I get the error ValueError: numpy.ufunc has the wrong size.

Complete error below:

Traceback (most recent call last):
  File "bin/cakechat_server.py", line 10, in <module>
    from cakechat.api.v1.server import app
  File "/root/cakechat/cakechat/api/v1/server.py", line 3, in <module>
    from cakechat.api.response import get_response
  File "/root/cakechat/cakechat/api/response.py", line 9, in <module>
    from cakechat.dialog_model.inference import get_nn_responses, warmup_predictor
  File "/root/cakechat/cakechat/dialog_model/inference/__init__.py", line 1, in <module>
    from cakechat.dialog_model.inference.utils import get_sequence_log_probs, get_sequence_score_by_thought_vector, \
  File "/root/cakechat/cakechat/dialog_model/inference/utils.py", line 5, in <module>
    from cakechat.dialog_model.model_utils import get_training_batch
  File "/root/cakechat/cakechat/dialog_model/model_utils.py", line 15, in <module>
    from cakechat.utils.w2v import get_w2v_model
  File "/root/cakechat/cakechat/utils/w2v/__init__.py", line 1, in <module>
    from cakechat.utils.w2v.model import get_w2v_model
  File "/root/cakechat/cakechat/utils/w2v/model.py", line 4, in <module>
    from gensim.models import Word2Vec
  File "/usr/local/lib/python2.7/dist-packages/gensim/__init__.py", line 6, in <module>
    from gensim import parsing, matutils, interfaces, corpora, models, similarities, summarization
  File "/usr/local/lib/python2.7/dist-packages/gensim/models/__init__.py", line 7, in <module>
    from .coherencemodel import CoherenceModel
  File "/usr/local/lib/python2.7/dist-packages/gensim/models/coherencemodel.py", line 30, in <module>
    from gensim.models.wrappers import LdaVowpalWabbit, LdaMallet
  File "/usr/local/lib/python2.7/dist-packages/gensim/models/wrappers/__init__.py", line 8, in <module>
    from .fasttext import FastText
  File "/usr/local/lib/python2.7/dist-packages/gensim/models/wrappers/fasttext.py", line 38, in <module>
    from gensim.models.word2vec import Word2Vec
  File "/usr/local/lib/python2.7/dist-packages/gensim/models/word2vec.py", line 135, in <module>
    from gensim.models.word2vec_inner import train_batch_sg, train_batch_cbow
  File "__init__.pxd", line 861, in init gensim.models.word2vec_inner (./gensim/models/word2vec_inner.c:10917)
ValueError: numpy.ufunc has the wrong size, try recompiling. Expected 192, got 216
retallicka commented 5 years ago

I got this error too

retallicka commented 5 years ago

For now I used the current release build and added RUN pip --no-cache-dir install pip==18.1 to the Dockerfile.cpu

tmagnussen commented 5 years ago

For now I used the current release build and added RUN pip --no-cache-dir install pip==18.1 to the Dockerfile.cpu

Works for me as well. Thanks a lot 👍

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.