From 9e2c3a5174fbe4d1c0be1257a1a01fe208ded7bc Mon Sep 17 00:00:00 2001 From: Dhruv Bhanushali Date: Mon, 16 Sep 2024 10:38:57 +0530 Subject: [PATCH] Specify platform to fix `ov` builds on macOS --- docker/dev_env/run.sh | 3 +++ ov | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docker/dev_env/run.sh b/docker/dev_env/run.sh index 4adcce196f..48d3564273 100755 --- a/docker/dev_env/run.sh +++ b/docker/dev_env/run.sh @@ -26,6 +26,9 @@ shared_args=( run_args=( -d --name "$container_name" + # Since we have build an amd64 image, we must specify the platform to + # suppress warnings about platform mismatch. + --platform linux/amd64 # Use host network so things like Sphinx and the frontend that run directly in `ov` # will have ports available on the host (and this way we don't have to manually map each one) --network host diff --git a/ov b/ov index 68006d129b..29410dc0d3 100755 --- a/ov +++ b/ov @@ -92,7 +92,8 @@ init) ;; build) - docker build "${@:2}" -t openverse-dev_env:latest "$dev_env" + # k6 does not install on aarch64, so we must specify the platform on macOS. + docker build "${@:2}" --platform linux/amd64 -t openverse-dev_env:latest "$dev_env" ;; setup-env)