Skip to content

Commit

Permalink
Update to run_demo script to support Apple M1 CPUs
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Curran <[email protected]>
  • Loading branch information
swcurran committed Mar 18, 2024
1 parent 74d12db commit 7056727
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions demo/run_demo
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ if [ -z "$DOCKER_NET" ]; then
fi
DOCKER_VOL=""

# Set default platform to linux/amd64 when running on Arm based MAC since there are no arm based images available currently.
# Must also use the Rosetta 2 software, which can be installed by running `softwareupdate --install-rosetta` from the Mac command line
if [[ $OSTYPE == 'darwin'* ]]; then
architecture=$(uname -m)
if [[ "${architecture}" == 'arm'* ]] || [[ "${architecture}" == 'aarch'* ]]; then
export DOCKER_DEFAULT_PLATFORM=linux/amd64
fi
fi

j=1
for i in "$@"
do
Expand Down

0 comments on commit 7056727

Please sign in to comment.