Skip to content

Commit

Permalink
fix: Correct CPU arch detection in install-dev.sh (#505)
Browse files Browse the repository at this point in the history
  • Loading branch information
studioego committed Jul 1, 2022
1 parent 1542707 commit 05ce1fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions changes/505.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use `uname -m` instead of `uname -p` for better compatibility with many Linux variants and macOS when configuring the image registry and pulling the base Python image
8 changes: 4 additions & 4 deletions scripts/install-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ show_info "Setting up databases..."
show_info "Configuring the Lablup's official image registry..."
./backend.ai mgr etcd put config/docker/registry/cr.backend.ai "https://cr.backend.ai"
./backend.ai mgr etcd put config/docker/registry/cr.backend.ai/type "harbor2"
if [ "$(uname -p)" = "arm" ]; then
if [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; then
./backend.ai mgr etcd put config/docker/registry/cr.backend.ai/project "stable,community,multiarch"
else
./backend.ai mgr etcd put config/docker/registry/cr.backend.ai/project "stable,community"
Expand All @@ -650,7 +650,7 @@ fi
# Scan the container image registry
show_info "Scanning the image registry..."
./backend.ai mgr etcd rescan-images cr.backend.ai
if [ "$(uname -p)" = "arm" ]; then
if [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; then
./backend.ai mgr etcd alias python "cr.backend.ai/multiarch/python:3.9-ubuntu20.04" aarch64
else
./backend.ai mgr etcd alias python "cr.backend.ai/stable/python:3.9-ubuntu20.04" x86_64
Expand Down Expand Up @@ -728,8 +728,8 @@ chmod +x "${CLIENT_USER_CONF_FOR_SESSION}"

show_info "Pre-pulling frequently used kernel images..."
echo "NOTE: Other images will be downloaded from the docker registry when requested.\n"
if [ "$(uname -p)" = "arm" ]; then
$docker_sudo docker pull "cr.backend.ai/stable/python:3.9-ubuntu20.04"
if [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; then
$docker_sudo docker pull "cr.backend.ai/multiarch/python:3.9-ubuntu20.04"
else
$docker_sudo docker pull "cr.backend.ai/stable/python:3.9-ubuntu20.04"
if [ $DOWNLOAD_BIG_IMAGES -eq 1 ]; then
Expand Down

0 comments on commit 05ce1fc

Please sign in to comment.