This is an automated email from the ASF dual-hosted git repository. rkk pushed a commit to branch SDAP-416-install-speedup in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git
commit 6e586d6860c7019472b88407cefc9d47b329ab36 Author: rileykk <[email protected]> AuthorDate: Wed Nov 30 12:57:51 2022 -0800 Use mamba to install analysis deps --- CHANGELOG.md | 1 + analysis/setup.py | 8 ++++++-- docker/nexus-webapp/Dockerfile | 3 +++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7409156..37cfbf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - SDAP-399: Updated quickstart guide for standalone docker deployment of SDAP. - SDAP-399: Updated quickstart Jupyter notebook - SDAP-411: Used global versioning for SDAP NEXUS artifacts +- SDAP-416: Using mamba to install nexus-analysis dependencies. (Also using conda as a fallback option if mamba install fails) ### Deprecated ### Removed - removed dropdown from matchup doms endpoint secondary param diff --git a/analysis/setup.py b/analysis/setup.py index 90dc797..99cd707 100644 --- a/analysis/setup.py +++ b/analysis/setup.py @@ -22,9 +22,13 @@ with open('../VERSION.txt', 'r') as f: try: - check_call(['conda', 'install', '-y', '-c', 'conda-forge', '--file', 'conda-requirements.txt']) + check_call(['mamba', 'install', '-y', '-c', 'conda-forge', '--file', 'conda-requirements.txt']) except (CalledProcessError, IOError) as e: - raise EnvironmentError("Error installing conda packages", e) + print('Failed install with mamba; falling back to conda') + try: + check_call(['conda', 'install', '-y', '-c', 'conda-forge', '--file', 'conda-requirements.txt']) + except (CalledProcessError, IOError) as e: + raise EnvironmentError("Error installing conda packages", e) setuptools.setup( diff --git a/docker/nexus-webapp/Dockerfile b/docker/nexus-webapp/Dockerfile index e945391..69af019 100644 --- a/docker/nexus-webapp/Dockerfile +++ b/docker/nexus-webapp/Dockerfile @@ -65,6 +65,9 @@ COPY docker/nexus-webapp/install_conda.sh ./install_conda.sh RUN /tmp/install_conda.sh RUN conda install python=3.8 + +RUN conda install mamba -y -c conda-forge + RUN cd /usr/lib && ln -s libcom_err.so.2 libcom_err.so.3 && \ cd /opt/conda/lib && \ ln -s libnetcdf.so.11 libnetcdf.so.7 && \
