From 7056727fb26fccad39939fd588601807770a4ba3 Mon Sep 17 00:00:00 2001
From: Stephen Curran <swcurran@gmail.com>
Date: Mon, 18 Mar 2024 12:49:17 -0700
Subject: [PATCH 1/2] Update to run_demo script to support Apple M1 CPUs

Signed-off-by: Stephen Curran <swcurran@gmail.com>
---
 demo/run_demo | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/demo/run_demo b/demo/run_demo
index 45fc7d813d..20e4afb394 100755
--- a/demo/run_demo
+++ b/demo/run_demo
@@ -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

From e3574808ccb2f19a824e5df52ed7b752806e2f00 Mon Sep 17 00:00:00 2001
From: Stephen Curran <swcurran@gmail.com>
Date: Mon, 18 Mar 2024 12:54:39 -0700
Subject: [PATCH 2/2] Add documentation to the Demo readme

Signed-off-by: Stephen Curran <swcurran@gmail.com>
---
 docs/demo/README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/demo/README.md b/docs/demo/README.md
index 61a0fe5b2d..1d218d609c 100644
--- a/docs/demo/README.md
+++ b/docs/demo/README.md
@@ -63,7 +63,7 @@ Jump to the [Follow the Script](#follow-the-script) section below for further in
 Running the demo in docker requires having a `von-network` (a Hyperledger Indy public ledger sandbox) instance running in docker locally. See the [VON Network Tutorial](https://github.com/bcgov/von-network/blob/main/docs/UsingVONNetwork.md) for guidance
 on starting and stopping your own local Hyperledger Indy instance.
 
-Open three `bash` shells. For Windows users, `git-bash` is highly recommended. bash is the default shell in Linux and Mac terminal sessions.
+Open three `bash` shells. For Windows users, `git-bash` is highly recommended. bash is the default shell in Linux and Mac terminal sessions. For Mac users on the newer M1/2/3 Apple Silicon devices, make sure that you install Apple's Rosetta 2 software, using these [installation instructions from Apple](https://support.apple.com/en-us/102527), and this even more useful [guidance on how to install Rosetta 2 from the command line](https://osxdaily.com/2020/12/04/how-install-rosetta-2-apple-silicon-mac/) which amounts to running this MacOS command: `softwareupdate --install-rosetta`.
 
 In the first terminal window, start `von-network` by following the [Building and Starting](https://github.com/bcgov/von-network/blob/main/docs/UsingVONNetwork.md#building-and-starting) instructions.