Skip to content

Commit

Permalink
Bladebit 3.0.0rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
guydavis committed Jul 24, 2023
1 parent 486a308 commit bd4eefc
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions scripts/bladebit_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 3,33 @@
# Installs bladebit - A fast Chia plotter, offering disk, ram, and gpu modes.
# See https://github.com/Chia-Network/bladebit
#
# Can't acutally build on Github servers, must build on each target system
# during container launch, otherwise get all sorts of errors.
#

BLADEBIT_BRANCH=$1
BLADEBIT_BRANCH=$1 # Now ignored...

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 /
echo "Cloning bladebit from https://github.com/Chia-Network/bladebit.git on branch:${BLADEBIT_BRANCH}"
git clone --recursive --branch ${BLADEBIT_BRANCH} https://github.com/Chia-Network/bladebit.git
cd /bladebit && echo "Building bladebit on ${arch_name}..."
mkdir -p build && cd build
cmake ..
cmake --build . --target bladebit --config Release
ln -s /bladebit/build/bladebit /usr/bin/bladebit
# Link to the bundled bladebit from Chia CLI DEB install...
ln -s /opt/chia/bladebit/bladebit /usr/bin/bladebit
cd / && echo "Bladebit version: "`bladebit --version`
cd /bladebit/build
# CNI devs actually zipped a tarball, then labelled it as double zipped...

# Now install CNI's separate binary for actual GPU plotting...
cd /opt/chia/bladebit
if [[ "${arch_name}" = "x86_64" ]]; then
curl -sLJO https://download.chia.net/bladebit/alpha4.4/bladebit-cuda-plotter/bladebit-cuda-v3.0.0-alpha4-ubuntu-x86-64.tar.gz.zip.zip
curl -sLJO https://github.com/Chia-Network/bladebit/releases/download/v3.0.0-rc1/bladebit-cuda-v3.0.0-rc1-ubuntu-x86-64.tar.gz
else
curl -sLJO https://download.chia.net/bladebit/alpha4.4/bladebit-cuda-plotter/bladebit-cuda-v3.0.0-alpha4-ubuntu-arm64.tar.gz.zip.zip
curl -sLJO https://github.com/Chia-Network/bladebit/releases/download/v3.0.0-rc1/bladebit-cuda-v3.0.0-rc1-ubuntu-arm64.tar.gz
fi
unzip *.zip
tar -xvf *.tar.gz
chmod 755 bladebit_cuda
ln -s /bladebit/build/bladebit_cuda /usr/bin/bladebit_cuda
chown root.root ./bladebit*
ln -s /opt/chia/bladebit/bladebit_cuda /usr/bin/bladebit_cuda
cd / && echo "Bladebit CUDA version: "`bladebit_cuda --version`
else
echo "Building bladebit skipped -> unsupported architecture: ${arch_name}"
echo "Bladebit binary download skipped -> unsupported architecture: ${arch_name}"
fi
fi
fi

0 comments on commit bd4eefc

Please sign in to comment.