Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named 'numpy' during docker build #102

Closed
moon-home opened this issue Mar 12, 2021 · 1 comment
Closed

No module named 'numpy' during docker build #102

moon-home opened this issue Mar 12, 2021 · 1 comment

Comments

@moon-home
Copy link

moon-home commented Mar 12, 2021

Hi!

I am following the installation instruction, I got the following error at the step of docker build -t convai .

I am using Mac 10.15, python 3.8, increased Docker memory to 4G.

I have tried the following ways to solve the issue:

  1. add RUN pip3 install --upgrade setuptools to the Dockerfile
  2. add --upgrade to RUN pip3 install -r /tmp/requirements.txt in Dockerfile
  3. add RUN pip3 install numpy before RUN pip3 install -r /tmp/requirements.txt in Dockerfile
  4. add RUN apt-get install python3-numpy before RUN pip3 install -r /tmp/requirements.txt in Dockerfile
  5. add numpy in requirements.txt
  6. using python 3.6.13 because of this post, but it has exact same error.

Can anyone help me on this? Thank you!!

 => [6/9] COPY . ./                                                                                                          0.0s
 => [7/9] COPY requirements.txt /tmp/requirements.txt                                                                        0.0s
 => ERROR [8/9] RUN pip3 install -r /tmp/requirements.txt                                                                   98.2s
------
 > [8/9] RUN pip3 install -r /tmp/requirements.txt:
#12 1.111 Collecting torch (from -r /tmp/requirements.txt (line 1))
#12 1.754   Downloading https://files.pythonhosted.org/packages/46/99/8b658e5095b9fb02e38ccb7ecc931eb1a03b5160d77148aecf68f8a7eeda/torch-1.8.0-cp36-cp36m-manylinux1_x86_64.whl (735.5MB)
#12 81.11 Collecting pytorch-ignite (from -r /tmp/requirements.txt (line 2))
#12 81.76   Downloading https://files.pythonhosted.org/packages/f8/d3/640f70d69393b415e6a29b27c735047ad86267921ad62682d1d756556d48/pytorch_ignite-0.4.4-py3-none-any.whl (200kB)
#12 81.82 Collecting transformers==2.5.1 (from -r /tmp/requirements.txt (line 3))
#12 82.17   Downloading https://files.pythonhosted.org/packages/13/33/ffb67897a6985a7b7d8e5e7878c3628678f553634bd3836404fef06ef19b/transformers-2.5.1-py3-none-any.whl (499kB)
#12 82.29 Collecting tensorboardX==1.8 (from -r /tmp/requirements.txt (line 4))
#12 82.50   Downloading https://files.pythonhosted.org/packages/c3/12/dcaf67e1312475b26db9e45e7bb6f32b540671a9ee120b3a72d9e09bc517/tensorboardX-1.8-py2.py3-none-any.whl (216kB)
#12 82.57 Collecting tensorflow (from -r /tmp/requirements.txt (line 5))
#12 83.12   Downloading https://files.pythonhosted.org/packages/de/f0/96fb2e0412ae9692dbf400e5b04432885f677ad6241c088ccc5fe7724d69/tensorflow-1.14.0-cp36-cp36m-manylinux1_x86_64.whl (109.2MB)
#12 95.24 Collecting spacy (from -r /tmp/requirements.txt (line 6))
#12 95.81   Downloading https://files.pythonhosted.org/packages/65/01/fd65769520d4b146d92920170fd00e01e826cda39a366bde82a87ca249db/spacy-3.0.5.tar.gz (7.0MB)
#12 97.41     Complete output from command python setup.py egg_info:
#12 97.41     Traceback (most recent call last):
#12 97.41       File "<string>", line 1, in <module>
#12 97.41       File "/tmp/pip-build-cc3a804w/spacy/setup.py", line 5, in <module>
#12 97.41         import numpy
#12 97.41     ModuleNotFoundError: No module named 'numpy'
#12 97.41     
#12 97.41     ----------------------------------------
#12 98.11 Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-cc3a804w/spacy/
@moon-home moon-home changed the title No nodule named 'numpy' during docker build No module named 'numpy' during docker build Mar 12, 2021
@moon-home
Copy link
Author

This is fixed in this post

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant