You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/26 22:42:39 UTC

[GitHub] [pulsar] heesung-sn commented on a diff in pull request #17733: [feat][build] Support ARM64-based docker images

heesung-sn commented on code in PR #17733:
URL: https://github.com/apache/pulsar/pull/17733#discussion_r980572376


##########
docker/pulsar/scripts/install-pulsar-client.sh:
##########
@@ -20,6 +20,13 @@
 
 set -x
 
+# TODO: remove these lines once grpcio doesn't need to compile from source on ARM64 platform
+ARCH=$(uname -m | sed -r 's/aarch64/arm64/g' |  awk '!/arm64/{$0="amd64"}1')
+if [ "${ARCH}" == "arm64" ]; then
+  apt update
+  apt -y install build-essential python3-dev
+fi
+
 PYTHON_MAJOR_MINOR=$(python3 -V | sed -E 's/.* ([[:digit:]]+)\.([[:digit:]]+).*/\1\2/')
 WHEEL_FILE=$(ls /pulsar/pulsar-client | grep "cp${PYTHON_MAJOR_MINOR}")
 pip3 install /pulsar/pulsar-client/${WHEEL_FILE}[all]

Review Comment:
   ```
   [INFO] DOCKER> [91m++ python3 -V
   ++ sed -E 's/.* ([[:digit:]]+)\.([[:digit:]]+).*/\1\2/'
   
   [INFO] DOCKER> [91m+ PYTHON_MAJOR_MINOR=38
   
   [INFO] DOCKER> [91m++ ls /pulsar/pulsar-client
   ++ grep cp38
   
   [INFO] DOCKER> [91m+ WHEEL_FILE='pulsar_client-2.11.0-cp38-cp38-manylinux1_x86_64.whl
   pulsar_client-2.11.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl'
   
   [INFO] DOCKER> [91m+ pip3 install /pulsar/pulsar-client/pulsar_client-2.11.0-cp38-cp38-manylinux1_x86_64.whl 'pulsar_client-2.11.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl[all]'
   
   [INFO] DOCKER> [91mERROR: pulsar_client-2.11.0-cp38-cp38-manylinux1_x86_64.whl is not a supported wheel on this platform.
   
   [INFO] DOCKER> Removing intermediate container a88eb585f4d1
   [ERROR] DOCKER> Unable to build image [apachepulsar/pulsar] : "The command '/bin/sh -c /pulsar/bin/install-pulsar-client.sh' returned a non-zero code: 1"  ["The command '/bin/sh -c /pulsar/bin/install-pulsar-client.sh' returned a non-zero code: 1" ]
   ```
   
   observed this error.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org