From 8bf9a3c82d7b87e45d7ecacd32c37b429dfa93a6 Mon Sep 17 00:00:00 2001 From: Jason Pell Date: Thu, 18 Dec 2025 16:25:47 +1100 Subject: [PATCH] for pip install forcefully only build on 2 cores on a rpi3 --- rpi/install-klipper.sh | 7 ++++++- rpi/installer.sh | 14 ++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/rpi/install-klipper.sh b/rpi/install-klipper.sh index 59c65ec1..635c4829 100755 --- a/rpi/install-klipper.sh +++ b/rpi/install-klipper.sh @@ -127,7 +127,12 @@ if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then retry sudo apt-get install --yes wget; error fi - wget -O - https://raw.githubusercontent.com/Frix-x/klippain-shaketune/main/install.sh | bash + curl -s -L https://raw.githubusercontent.com/Frix-x/klippain-shaketune/main/install.sh -o /tmp/install.sh || exit $? + chmod 777 /tmp/install.sh + + # leave 2 cores to avoid overwhelming the device + taskset -c 0-$(($(nproc) - 3)) /tmp/install.sh + rm /tmp/install.sh fi fi diff --git a/rpi/installer.sh b/rpi/installer.sh index de07385c..9a727025 100755 --- a/rpi/installer.sh +++ b/rpi/installer.sh @@ -258,7 +258,8 @@ function install_cartographer_klipper() { echo echo "INFO: Running cartographer-klipper installer ..." - bash $BASEDIR/cartographer-klipper/install.sh || exit $? + # leave 2 cores to avoid overwhelming the device + taskset -c 0-$(($(nproc) - 3)) $BASEDIR/cartographer-klipper/install.sh || exit $? $BASEDIR/klippy-env/bin/python3 -m compileall $BASEDIR/klipper/klippy || exit $? echo "cartographer-klipper" >> $BASEDIR/pellcorp.done @@ -285,7 +286,12 @@ function install_cartographer_plugin() { fi if [ ! -f $BASEDIR/klipper/klippy/extras/cartographer.py ]; then - curl -s -L https://raw.githubusercontent.com/Cartographer3D/cartographer3d-plugin/refs/heads/main/scripts/install.sh | bash || exit $? + curl -s -L https://raw.githubusercontent.com/Cartographer3D/cartographer3d-plugin/refs/heads/main/scripts/install.sh -o /tmp/install.sh || exit $? + chmod 777 /tmp/install.sh + + # leave 2 cores to avoid overwhelming the device + taskset -c 0-$(($(nproc) - 3)) /tmp/install.sh + rm /tmp/install.sh fi echo "cartographer-plugin" >> $BASEDIR/pellcorp.done @@ -310,8 +316,8 @@ function install_beacon_klipper() { git clone https://github.com/beacon3d/beacon_klipper $BASEDIR/beacon-klipper || exit $? fi - $BASEDIR/pellcorp/tools/beacon-install.sh || return $? - + # leave 2 cores to avoid overwhelming the device + taskset -c 0-$(($(nproc) - 3)) $BASEDIR/beacon_klipper/install.sh || exit $? $BASEDIR/klippy-env/bin/python3 -m compileall $BASEDIR/klipper/klippy || exit $? echo "beacon-klipper" >> $BASEDIR/pellcorp.done