From e50cd3795b3d13a8cd7710abc93158ba9c5ad0b9 Mon Sep 17 00:00:00 2001 From: Matteo Mortari Date: Thu, 11 Apr 2024 14:09:47 +0200 Subject: [PATCH] implement todo for protoc aarch_64, avoid network:host Signed-off-by: Matteo Mortari --- Makefile | 2 +- docker-compose-local.yaml | 11 ++--------- scripts/install_protoc.sh | 4 +++- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 20a659057..c0b6e6814 100644 --- a/Makefile +++ b/Makefile @@ -212,7 +212,7 @@ endif # build docker image .PHONY: image/build image/build: - ${DOCKER} build . -f ${DOCKERFILE} -t ${IMG}:$(IMG_VERSION) --network host + ${DOCKER} build . -f ${DOCKERFILE} -t ${IMG}:$(IMG_VERSION) # push docker image .PHONY: image/push diff --git a/docker-compose-local.yaml b/docker-compose-local.yaml index 7e41366a8..eeeac8a56 100644 --- a/docker-compose-local.yaml +++ b/docker-compose-local.yaml @@ -4,10 +4,7 @@ services: image: gcr.io/tfx-oss-public/ml_metadata_store_server:1.14.0 container_name: mlmd-server ports: - - target: 8080 - published: 9090 - protocol: tcp - mode: host + - "9090:8080" environment: - METADATA_STORE_SERVER_CONFIG_FILE=/tmp/shared/conn_config.pb volumes: @@ -16,13 +13,9 @@ services: build: context: . dockerfile: Dockerfile - network: host command: ["proxy", "--hostname", "0.0.0.0", "--mlmd-hostname", "mlmd-server", "--mlmd-port", "8080"] container_name: model-registry ports: - - target: 8080 - published: 8080 - protocol: tcp - mode: host + - "8080:8080" depends_on: - mlmd-server diff --git a/scripts/install_protoc.sh b/scripts/install_protoc.sh index d8ce2a185..b7b165e5f 100755 --- a/scripts/install_protoc.sh +++ b/scripts/install_protoc.sh @@ -9,8 +9,10 @@ if [[ "$OSTYPE" == "darwin"* ]]; then # Mac OSX OS="osx" fi -# TODO: support for arm ARCH="x86_64" +if [[ "$(uname -m)" == "arm"* ]]; then + ARCH="aarch_64" +fi mkdir -p ${SCRIPT_DIR}/../bin