From ef459eb0cf9e412e5fa41f62ee98a97a4ee6a57d Mon Sep 17 00:00:00 2001 From: Terence Tuhinanshu Date: Fri, 22 Feb 2019 09:45:33 -0500 Subject: [PATCH] Circumvent GWLF-E SegFaults due to NumPy 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: https://github.com/numpy/numpy/issues/11871 https://stackoverflow.com/q/54153886 --- deployment/ansible/group_vars/all | 1 + .../model-my-watershed.celery-worker/tasks/dependencies.yml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/deployment/ansible/group_vars/all b/deployment/ansible/group_vars/all index d02981e02..da970f137 100644 --- a/deployment/ansible/group_vars/all +++ b/deployment/ansible/group_vars/all @@ -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" diff --git a/deployment/ansible/roles/model-my-watershed.celery-worker/tasks/dependencies.yml b/deployment/ansible/roles/model-my-watershed.celery-worker/tasks/dependencies.yml index 443d9f032..4e1218289 100644 --- a/deployment/ansible/roles/model-my-watershed.celery-worker/tasks/dependencies.yml +++ b/deployment/ansible/roles/model-my-watershed.celery-worker/tasks/dependencies.yml @@ -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: