You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sdap.apache.org by rk...@apache.org on 2023/10/25 22:59:31 UTC

[incubator-sdap-ingester] branch SDAP-488-nexusproto-docker created (now 0fafa2c)

This is an automated email from the ASF dual-hosted git repository.

rkk pushed a change to branch SDAP-488-nexusproto-docker
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-ingester.git


      at 0fafa2c  Install nexusproto from PyPI w/ option to build from source

This branch includes the following new commits:

     new 0fafa2c  Install nexusproto from PyPI w/ option to build from source

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-sdap-ingester] 01/01: Install nexusproto from PyPI w/ option to build from source

Posted by rk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rkk pushed a commit to branch SDAP-488-nexusproto-docker
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-ingester.git

commit 0fafa2c4e7f0da1132fe4e7198925f6e32a359ca
Author: rileykk <ri...@jpl.nasa.gov>
AuthorDate: Wed Oct 25 15:58:41 2023 -0700

    Install nexusproto from PyPI w/ option to build from source
---
 CHANGELOG.md                                  |  1 +
 granule_ingester/docker/Dockerfile            |  4 ++++
 granule_ingester/docker/install_nexusproto.sh | 32 ++++++++++++++++-----------
 3 files changed, 24 insertions(+), 13 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9cfeab6..ec18b01 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 ### Deprecated
 ### Removed
 ### Fixed
+- SDAP-488: Workaround to build issue on Apple Silicon (M1/M2). GI image build installs nexusproto through PyPI instead of building from source. A build arg `BUILD_NEXUSPROTO` was defined to allow building from source if desired/
 ### Security
 
 ## [1.1.0] - 2023-04-26
diff --git a/granule_ingester/docker/Dockerfile b/granule_ingester/docker/Dockerfile
index 8a4e258..e285872 100644
--- a/granule_ingester/docker/Dockerfile
+++ b/granule_ingester/docker/Dockerfile
@@ -30,6 +30,10 @@ COPY granule_ingester/conda-requirements.txt /sdap/conda-requirements.txt
 COPY granule_ingester/docker/install_nexusproto.sh /install_nexusproto.sh
 COPY granule_ingester/docker/entrypoint.sh /entrypoint.sh
 
+ARG BUILD_NEXUSPROTO
+ARG APACHE_NEXUSPROTO=https://github.com/apache/incubator-sdap-nexusproto.git
+ARG APACHE_NEXUSPROTO_BRANCH=master
+
 RUN ./install_nexusproto.sh
 RUN cd /common && python setup.py install
 RUN cd /sdap && python setup.py install
diff --git a/granule_ingester/docker/install_nexusproto.sh b/granule_ingester/docker/install_nexusproto.sh
index 6cda614..e807963 100755
--- a/granule_ingester/docker/install_nexusproto.sh
+++ b/granule_ingester/docker/install_nexusproto.sh
@@ -15,21 +15,27 @@
 
 set -e
 
-APACHE_NEXUSPROTO="https://github.com/apache/incubator-sdap-nexusproto.git"
-MASTER="master"
+if [ ! -z ${BUILD_NEXUSPROTO+x} ]; then
+  echo 'Building nexusproto from source...'
 
-GIT_REPO=${1:-$APACHE_NEXUSPROTO}
-GIT_BRANCH=${2:-$MASTER}
+  APACHE_NEXUSPROTO="https://github.com/apache/incubator-sdap-nexusproto.git"
+  MASTER="master"
 
-mkdir nexusproto
-cd nexusproto
-git init
-git pull ${GIT_REPO} ${GIT_BRANCH}
+  GIT_REPO=${1:-$APACHE_NEXUSPROTO}
+  GIT_BRANCH=${2:-$MASTER}
 
-./gradlew pythonInstall --info
+  mkdir nexusproto
+  pushd nexusproto
+  git init
+  git pull ${GIT_REPO} ${GIT_BRANCH}
 
-./gradlew install --info
+  ./gradlew pythonInstall --info
 
-rm -rf /root/.gradle
-cd ..
-rm -rf nexusproto
+  ./gradlew install --info
+
+  rm -rf /root/.gradle
+  popd
+  rm -rf nexusproto
+else
+  pip install nexusproto
+fi