Skip to content

Commit

Permalink
Circumvent GWLF-E SegFaults due to NumPy
Browse files Browse the repository at this point in the history
A recent release of NumPy introduced a new module _multiarray_umath.
Unfortunately, there are some tools that depend on NumPy and pull
in the latest version as a build dependency. This latest version is
then replaced with the version specified in our requirements.txt,
thus the module is not available at run-time causing the segfaults.

By installing NumPy separately before requirements.txt is gathered,
we ensure that whatever was using the most recent version of NumPy
in its installation now uses the pre-installed one.

We'll have to ensure that the version of NumPy in requirements.txt
matches the one in Ansible.

For details see:

numpy/numpy#11871
https://stackoverflow.com/q/54153886
  • Loading branch information
rajadain committed Feb 22, 2019
1 parent b392627 commit 4b2f215
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions deployment/ansible/group_vars/all
Expand Up @@ -60,5 +60,6 @@ observation_api_url: "http://www.wikiwatershed-vs.org/"
enabled_features: ''

numba_version: "0.38.1"
numpy_version: "1.14.5"

redis_version: "2:2.8.4-2ubuntu0.2"
Expand Up @@ -2,6 +2,9 @@
- name: Install numba
pip: name=numba version={{ numba_version }}

- name: Install numpy
pip: name=numpy version={{ numpy_version }}

- name: Install application Python dependencies for development and test
pip: requirements="{{ app_home }}/requirements/{{ item }}.txt"
with_items:
Expand Down
Expand Up @@ -2,6 +2,9 @@
- name: Install numba
pip: name=numba version={{ numba_version }}

- name: Install numpy
pip: name=numpy version={{ numpy_version }}

- name: Install application Python dependencies for development and test
pip: requirements="{{ app_home }}/requirements/{{ item }}.txt"
with_items:
Expand Down

0 comments on commit 4b2f215

Please sign in to comment.