Skip to content

Commit

Permalink
Merge pull request #2843 from swcurran/m1-build-issue
Browse files Browse the repository at this point in the history
Update to run_demo script to support Apple M1 CPUs
  • Loading branch information
swcurran authored Mar 20, 2024
2 parents 9da989c + 997a20f commit 5501672
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions demo/run_demo
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,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
2 changes: 1 addition & 1 deletion docs/demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 5501672

Please sign in to comment.