Add convenience script to download performance libraries
This commit is contained in:
parent
410272ee1d
commit
89fc0ad7a9
|
@ -95,7 +95,7 @@ To run a performance-enhanced fullnode on Linux, download `libcuda_verify_ed2551
|
||||||
it by adding `--features=cuda` to the line that runs `solana-fullnode` in `leader.sh`.
|
it by adding `--features=cuda` to the line that runs `solana-fullnode` in `leader.sh`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ wget https://solana-build-artifacts.s3.amazonaws.com/v0.5.0/libcuda_verify_ed25519.a
|
$ ./fetch-perf-libs.sh
|
||||||
$ cargo run --release --features=cuda --bin solana-fullnode -- -l leader.json < genesis.log
|
$ cargo run --release --features=cuda --bin solana-fullnode -- -l leader.json < genesis.log
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -2,17 +2,10 @@
|
||||||
|
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
LIB=libcuda_verify_ed25519.a
|
./fetch-perf-libs.sh
|
||||||
if [[ ! -r $LIB ]]; then
|
|
||||||
if [[ -z "${libcuda_verify_ed25519_URL:-}" ]]; then
|
|
||||||
echo "$0 skipped. Unable to locate $LIB"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
export LD_LIBRARY_PATH=/usr/local/cuda/lib64
|
export LD_LIBRARY_PATH=/usr/local/cuda/lib64
|
||||||
export PATH=$PATH:/usr/local/cuda/bin
|
export PATH=$PATH:/usr/local/cuda/bin
|
||||||
curl -X GET -o $LIB "$libcuda_verify_ed25519_URL"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# shellcheck disable=SC1090 # <-- shellcheck can't follow ~
|
# shellcheck disable=SC1090 # <-- shellcheck can't follow ~
|
||||||
source ~/.cargo/env
|
source ~/.cargo/env
|
||||||
|
|
|
@ -4,22 +4,8 @@ set -o xtrace
|
||||||
|
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
if [[ -z "${libgf_complete_URL:-}" ]]; then
|
./fetch-perf-libs.sh
|
||||||
echo libgf_complete_URL undefined
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z "${libJerasure_URL:-}" ]]; then
|
|
||||||
echo libJerasure_URL undefined
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
curl -X GET -o libJerasure.so "$libJerasure_URL"
|
|
||||||
curl -X GET -o libgf_complete.so "$libgf_complete_URL"
|
|
||||||
|
|
||||||
ln -s libJerasure.so libJerasure.so.2
|
|
||||||
ln -s libJerasure.so libJerasure.so.2.0.0
|
|
||||||
ln -s libgf_complete.so libgf_complete.so.1.0.0
|
|
||||||
export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH
|
||||||
|
|
||||||
# shellcheck disable=SC1090 # <-- shellcheck can't follow ~
|
# shellcheck disable=SC1090 # <-- shellcheck can't follow ~
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
if [[ $(uname) != Linux ]]; then
|
||||||
|
echo Performance libraries are only available for Linux
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $(uname -m) != x86_64 ]]; then
|
||||||
|
echo Performance libraries are only available for x86_64 architecture
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
(
|
||||||
|
set -x
|
||||||
|
curl -o solana-perf.tgz \
|
||||||
|
https://solana-perf.s3.amazonaws.com/master/x86_64-unknown-linux-gnu/solana-perf.tgz
|
||||||
|
tar zxvf solana-perf.tgz
|
||||||
|
)
|
||||||
|
|
||||||
|
echo "Downloaded solana-perf version: $(cat solana-perf-HEAD.txt)"
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue