diff --git a/scripts/bladebit_setup.sh b/scripts/bladebit_setup.sh index 5d6242a5..8eac9d68 100644 --- a/scripts/bladebit_setup.sh +++ b/scripts/bladebit_setup.sh @@ -9,32 +9,28 @@ BLADEBIT_BRANCH=$1 # Now ignored as install binaries from Github. if [[ (${mode} =~ ^fullnode.* || ${mode} =~ "plotter") && (${blockchains} == 'chia') ]]; then if [ ! -f /usr/bin/bladebit ] && [[ "${bladebit_skip_build}" != 'true' ]]; then arch_name="$(uname -m)" - if [[ "${arch_name}" = "x86_64" ]] || [[ "${arch_name}" = "arm64" ]]; then - apt update && apt install -y build-essential cmake libgmp-dev libnuma-dev - cd / + apt update && apt install -y build-essential cmake libgmp-dev libnuma-dev + cd / && echo "Installing bladebit on ${arch_name}..." - # Now install CNI's separate binary for actual GPU plotting... - cd /opt/chia/bladebit - rm -f ./bladebit # Remove stale version bundled in the DEB package. - if [[ "${arch_name}" = "x86_64" ]]; then - curl -sLJO https://github.com/Chia-Network/bladebit/releases/download/v3.1.0/bladebit-v3.1.0-ubuntu-x86-64.tar.gz - curl -sLJO https://github.com/Chia-Network/bladebit/releases/download/v3.1.0/bladebit-cuda-v3.1.0-ubuntu-x86-64.tar.gz - else - curl -sLJO https://github.com/Chia-Network/bladebit/releases/download/v3.1.0/bladebit-v3.1.0-ubuntu-arm64.tar.gz - curl -sLJO https://github.com/Chia-Network/bladebit/releases/download/v3.1.0/bladebit-cuda-v3.1.0-ubuntu-arm64.tar.gz - fi - tar -xvf bladebit-v3.*.tar.gz - tar -xvf bladebit-cuda-v3.*.tar.gz - rm -f *tar.gz - chmod 755 bladebit* - chown root.root ./bladebit* - - ln -s /opt/chia/bladebit/bladebit /usr/bin/bladebit - cd / && echo "Bladebit version: "`bladebit --version` - ln -s /opt/chia/bladebit/bladebit_cuda /usr/bin/bladebit_cuda - cd / && echo "Bladebit CUDA version: "`bladebit_cuda --version` + # Now install CNI's separate binary for actual GPU plotting... + cd /opt/chia/bladebit + rm -f ./bladebit # Remove stale version bundled in the DEB package. + if [[ "${arch_name}" = "x86_64" ]]; then + curl -sLJO https://github.com/Chia-Network/bladebit/releases/download/v3.1.0/bladebit-v3.1.0-ubuntu-x86-64.tar.gz + curl -sLJO https://github.com/Chia-Network/bladebit/releases/download/v3.1.0/bladebit-cuda-v3.1.0-ubuntu-x86-64.tar.gz else - echo "Bladebit binary download skipped -> unsupported architecture: ${arch_name}" + curl -sLJO https://github.com/Chia-Network/bladebit/releases/download/v3.1.0/bladebit-v3.1.0-ubuntu-arm64.tar.gz + curl -sLJO https://github.com/Chia-Network/bladebit/releases/download/v3.1.0/bladebit-cuda-v3.1.0-ubuntu-arm64.tar.gz fi + tar -xvf bladebit-v3.*.tar.gz + tar -xvf bladebit-cuda-v3.*.tar.gz + rm -f *tar.gz + chmod 755 bladebit* + chown root.root ./bladebit* + + ln -s /opt/chia/bladebit/bladebit /usr/bin/bladebit + cd / && echo "Bladebit version: "`bladebit --version` + ln -s /opt/chia/bladebit/bladebit_cuda /usr/bin/bladebit_cuda + cd / && echo "Bladebit CUDA version: "`bladebit_cuda --version` fi fi diff --git a/scripts/config_api_server.sh b/scripts/config_api_server.sh index f7469282..1e4cc19e 100644 --- a/scripts/config_api_server.sh +++ b/scripts/config_api_server.sh @@ -8,7 +8,7 @@ if [ ! -f "${API_SETTINGS_FILE}" ]; then arch_name="$(uname -m)" echo "Configuring API server for arch_name=${arch_name}" if [ "${mode}" == "fullnode" ]; then - if [ "${arch_name}" = "aarch64" ]; then + if [ "${arch_name}" != "x86_64" ]; then echo "STATUS_EVERY_X_MINUTES = 4" > ${API_SETTINGS_FILE} else echo "STATUS_EVERY_X_MINUTES = 2" > ${API_SETTINGS_FILE} diff --git a/scripts/forks/chia_install.sh b/scripts/forks/chia_install.sh index 1c38fedd..cf06f421 100644 --- a/scripts/forks/chia_install.sh +++ b/scripts/forks/chia_install.sh @@ -29,10 +29,8 @@ else if [[ "${arch_name}" = "x86_64" ]]; then curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.1.1-rc1/chia-blockchain-cli_2.1.1rc1-1_amd64.deb apt-get install ./chia-blockchain-cli*.deb - elif [[ "${arch_name}" = "arm64" ]]; then + else curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.1.1-rc1/chia-blockchain-cli_2.1.1rc1-1_arm64.deb apt-get install ./chia-blockchain-cli*.deb - else - echo "Installing Chia CUDA binaries skipped -> unsupported architecture: ${arch_name}" fi fi diff --git a/scripts/forks/chia_launch.sh b/scripts/forks/chia_launch.sh index 259e7089..d508d9d7 100644 --- a/scripts/forks/chia_launch.sh +++ b/scripts/forks/chia_launch.sh @@ -84,7 +84,7 @@ for p in ${plots_dir//:/ }; do done chmod 755 -R /root/.chia/mainnet/config/ssl/ &> /dev/null -chia init --fix-ssl-permissions +chia init --fix-ssl-permissions &> /dev/null /usr/bin/bash /machinaris/scripts/gpu_drivers_setup.sh diff --git a/scripts/madmax_setup.sh b/scripts/madmax_setup.sh index 8b5c5ca9..b06d5c1d 100644 --- a/scripts/madmax_setup.sh +++ b/scripts/madmax_setup.sh @@ -12,26 +12,22 @@ CLASSIC_MADMAX_BRANCH=master if [[ (${mode} =~ ^fullnode.* || ${mode} =~ "plotter") && (${blockchains} == 'chia' || ${blockchains} == 'chives') ]]; then if [ ! -f /usr/bin/chia_plot ] && [[ "${madmax_skip_build}" != 'true' ]]; then arch_name="$(uname -m)" - if [[ "${arch_name}" = "x86_64" ]] || [[ "${arch_name}" = "arm64" ]]; then - apt update && apt install -y libsodium-dev cmake g++ git build-essential - cd / - git clone --branch ${CLASSIC_MADMAX_BRANCH} https://github.com/madMAx43v3r/chia-plotter.git - cd chia-plotter && echo "Building madmax on ${arch_name}..." - if [[ -z "${madmax_relic_main}" ]]; then # Hack on 2021-11-29 due to failed builds on some systems... - sed -i 's/set(ENV{RELIC_MAIN} "1")/#set(ENV{RELIC_MAIN} "1")/g' CMakeLists.txt - fi - git submodule update --init - git checkout $HASH - ./make_devel.sh - mkdir -p /usr/lib/chia-plotter - cp -r ./build/* /usr/lib/chia-plotter - ln -s /usr/lib/chia-plotter/chia_plot /usr/bin/chia_plot - ln -s /usr/lib/chia-plotter/chia_plot_k34 /usr/bin/chia_plot_k34 - cd / - rm -rf chia-plotter - else - echo "Building madmax skipped -> unsupported architecture: ${arch_name}" + apt update && apt install -y libsodium-dev cmake g++ git build-essential + cd / + git clone --branch ${CLASSIC_MADMAX_BRANCH} https://github.com/madMAx43v3r/chia-plotter.git + cd chia-plotter && echo "Building madmax on ${arch_name}..." + if [[ -z "${madmax_relic_main}" ]]; then # Hack on 2021-11-29 due to failed builds on some systems... + sed -i 's/set(ENV{RELIC_MAIN} "1")/#set(ENV{RELIC_MAIN} "1")/g' CMakeLists.txt fi + git submodule update --init + git checkout $HASH + ./make_devel.sh + mkdir -p /usr/lib/chia-plotter + cp -r ./build/* /usr/lib/chia-plotter + ln -s /usr/lib/chia-plotter/chia_plot /usr/bin/chia_plot + ln -s /usr/lib/chia-plotter/chia_plot_k34 /usr/bin/chia_plot_k34 + cd / + rm -rf chia-plotter fi fi