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

Numpy installation problem #394

Closed
Stikus opened this issue Dec 9, 2020 · 4 comments
Closed

Numpy installation problem #394

Stikus opened this issue Dec 9, 2020 · 4 comments

Comments

@Stikus
Copy link

Stikus commented Dec 9, 2020

Hello DeepVariant team, thanks for great tool.

After we tried to upgrade our deepvariant installation to the latest release we encountered a problem with numpy installation, which I described here. The problem is caused by wheel - not by numpy itself, but this error raised several questions for me:

  • For now looks like installing deepvariant with https://github.com/google/deepvariant/blob/r1.1/build-prereq.sh will fail on non Ubuntu 16.04 due to numpy problem. This problem won't be fixed in older versions of numpy I think - only wheel can fix it now. Or you can switch numpy 1.18.5 for 1.19.3+?

  • Part of this problem origins from using Python 3.6 if I understand correctly this, maybe you should update version of Python installing by script?

  • I've just tested your installation script with one change: I added Ubuntu 18.04 to this check - looks like all good. If a problem was in Ubuntu 14.04 - maybe wide this check a bit? Even Ubuntu 20.04 is released half a year ago.

@pichuan
Copy link
Collaborator

pichuan commented Dec 9, 2020

@Stikus Thanks for reporting the issue.
Let me confirm I understand the issue correctly-
You try to build on Ubuntu 18.04, but were having issue on numpy. Is that correct?

Currently, our setup was only tested on 16.04. When build-prereq.sh and run-prereq.sh was written, we did test it on 14 and 18. But over time, those settings were not regularly tested and maintained. We also didn't remove them from our scripts.
As you can see, https://github.com/google/deepvariant/blob/r1.1/Dockerfile was build on Ubuntu16.04.

That said, we're also aware that Ubuntu 16.04 will reach its end of standard support next April, so, we currently have an internal update that makes our standard build in Ubuntu 18.04 in future releases. I just didn't quite have time to make that the standard before v1.1. (And I also didn't test our script on Ubuntu 18.04. Sorry about that.)

@Stikus Let me finish the internal testing of updating our scripts to 18.04, and I can share the new scripts with you so that you can build properly on Ubuntu18.04.

@Stikus
Copy link
Author

Stikus commented Dec 10, 2020

We're using 18.04 to build your releases from r0.7 - everything works fine. This problem appears first time and is not related to Ubuntu version. I suppose that pip3 install "${PIP_ARGS[@]}" --no-binary=:all: "numpy==${DV_TF_NUMPY_VERSION}" won't work on Ubuntu 16.04 too if you try.

But you are correct: we're trying to build on Ubuntu 18.04, but were having issue on numpy.

For now, I've fixed this issue by widening check (now it doesn't apply --no-binary=:all: to Ubuntu 18.04 too). I'll wait until you switch to 18.04 for official support, thanks. Closing this.

@pichuan
Copy link
Collaborator

pichuan commented Dec 10, 2020

Thanks for the update, @Stikus

In the code I'm working on, I currently changed that block to:

# Because of an issue with pypi's numpy on Ubuntu 14.04. we need to compile from
# source.
# See https://github.com/tensorflow/tensorflow/issues/6968#issuecomment-279061085
if [[ "$(lsb_release -d)" == *Ubuntu*14.04.* ]]; then
  echo "Installing numpy with -no-binary=:all:. This will take a bit longer."
  pip3 install "${PIP_ARGS[@]}" --no-binary=:all: "numpy==${DV_TF_NUMPY_VERSION}"
else
  pip3 install "${PIP_ARGS[@]}" "numpy==${DV_TF_NUMPY_VERSION}"
fi

But I'm also wondering if I should just remove if/else statement for different Ubuntu versions if we're not internally testing it to make sure everything still runs. So I might end up simplifying this further in the next release. Glad to hear that the fix you mentioned above worked for you.

@Stikus
Copy link
Author

Stikus commented Dec 11, 2020

@pichuan As you can see in my related issue in wheel - --no-binary=numpy will work even in current situation due to not installing wheel from source (what causing the problem) and if understand correctly "Because of an issue with pypi's numpy on Ubuntu 14.04, we need to compile from source." - it will fix this issue too.

So, if you're planning to leave support for different Ubuntu versions in the script (which is great - for now I use a slightly modified version of your script and not my own), I suggest to change --no-binary=:all: to --no-binary=numpy and all will be ok.

Actually, while you're modifying scripts - I suggest decreasing the verbosity of curl and wget in lines 71 and 110 in build-prereq.sh and in lines 93 and 201 in run-prereq.sh with -Ss and -q.

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

2 participants