Rework solana-validator-cuda to automatically prepare the perf-libs env (#5849)
automerge
This commit is contained in:
@ -1,14 +1,4 @@
|
|||||||
# Validator Monitoring
|
# Validator Monitoring
|
||||||
When `validator.sh` starts, it will output a validator configuration that looks
|
|
||||||
similar to:
|
|
||||||
```bash
|
|
||||||
======================[ validator configuration ]======================
|
|
||||||
identity pubkey: 4ceWXsL3UJvn7NYZiRkw7NsryMpviaKBDYr8GK7J61Dm
|
|
||||||
vote pubkey: 2ozWvfaXQd1X6uKh8jERoRGApDqSqcEy6fF1oN13LL2G
|
|
||||||
ledger: ...
|
|
||||||
accounts: ...
|
|
||||||
======================================================================
|
|
||||||
```
|
|
||||||
|
|
||||||
## Check Gossip
|
## Check Gossip
|
||||||
The **identity pubkey** for your validator can also be found by running:
|
The **identity pubkey** for your validator can also be found by running:
|
||||||
|
@ -75,23 +75,25 @@ choice, to start the node:
|
|||||||
|
|
||||||
If this is a `solana-install`-installation:
|
If this is a `solana-install`-installation:
|
||||||
```bash
|
```bash
|
||||||
$ validator.sh --identity ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --ledger ~/validator-config --rpc-port 8899 --poll-for-new-genesis-block --entrypoint testnet.solana.com
|
$ solana-validator --identity ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --ledger ~/validator-config --rpc-port 8899 --entrypoint testnet.solana.com
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, the `solana-install run` command can be used to run the validator
|
Alternatively, the `solana-install run` command can be used to run the validator
|
||||||
node while periodically checking for and applying software updates:
|
node while periodically checking for and applying software updates:
|
||||||
```bash
|
```bash
|
||||||
$ solana-install run validator.sh -- --identity ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --ledger ~/validator-config --rpc-port 8899 --poll-for-new-genesis-block --entrypoint testnet.solana.com
|
$ solana-install run solana-validator -- --identity ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --ledger ~/validator-config --rpc-port 8899 --entrypoint testnet.solana.com
|
||||||
```
|
```
|
||||||
|
|
||||||
If you built from source:
|
If you built from source:
|
||||||
```bash
|
```bash
|
||||||
$ NDEBUG=1 USE_INSTALL=1 ./multinode-demo/validator.sh --identity ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --rpc-port 8899 --poll-for-new-genesis-block --entrypoint testnet.solana.com
|
$ NDEBUG=1 USE_INSTALL=1 ./multinode-demo/validator.sh --identity ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --rpc-port 8899 --entrypoint testnet.solana.com
|
||||||
```
|
```
|
||||||
|
|
||||||
### Enabling CUDA
|
### Enabling CUDA
|
||||||
By default CUDA is disabled. If your machine has a GPU with CUDA installed,
|
If your machine has a GPU with CUDA installed (Linux-only currently), use the `solana-validator-cuda`
|
||||||
define the SOLANA_CUDA flag in your environment *before* running any of the
|
executable instead of `solana-validator`.
|
||||||
|
|
||||||
|
Or if you built from source, define the SOLANA_CUDA flag in your environment *before* running any of the
|
||||||
previusly mentioned commands
|
previusly mentioned commands
|
||||||
```bash
|
```bash
|
||||||
$ export SOLANA_CUDA=1
|
$ export SOLANA_CUDA=1
|
||||||
@ -103,7 +105,7 @@ When your validator is started look for the following log message to indicate th
|
|||||||
### Controlling local network port allocation
|
### Controlling local network port allocation
|
||||||
By default the validator will dynamically select available network ports in the
|
By default the validator will dynamically select available network ports in the
|
||||||
8000-10000 range, and may be overridden with `--dynamic-port-range`. For
|
8000-10000 range, and may be overridden with `--dynamic-port-range`. For
|
||||||
example, `validator.sh --dynamic-port-range 11000-11010 ...` will restrict the
|
example, `solana-validator --dynamic-port-range 11000-11010 ...` will restrict the
|
||||||
validator to ports 11000-11011.
|
validator to ports 11000-11011.
|
||||||
|
|
||||||
### Limiting ledger size to conserve disk space
|
### Limiting ledger size to conserve disk space
|
||||||
|
@ -61,7 +61,7 @@ Solana-gossip and solana-validator commands already require an explicit
|
|||||||
`--entrypoint` argument. Simply replace testnet.solana.com in the examples with
|
`--entrypoint` argument. Simply replace testnet.solana.com in the examples with
|
||||||
an alternate url to interact with a different testnet. For example:
|
an alternate url to interact with a different testnet. For example:
|
||||||
```bash
|
```bash
|
||||||
$ validator.sh --identity ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --ledger ~/validator-config --rpc-port 8899 --poll-for-new-genesis-block beta.testnet.solana.com
|
$ solana-validator --identity ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --ledger ~/validator-config --rpc-port 8899 beta.testnet.solana.com
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also submit JSON-RPC requests to a different testnet, like:
|
You can also submit JSON-RPC requests to a different testnet, like:
|
||||||
|
@ -90,7 +90,22 @@ echo --- Creating tarball
|
|||||||
cd validator
|
cd validator
|
||||||
cargo +"$rust_stable" install --path . --features=cuda --root ../solana-release-cuda
|
cargo +"$rust_stable" install --path . --features=cuda --root ../solana-release-cuda
|
||||||
)
|
)
|
||||||
cp solana-release-cuda/bin/solana-validator solana-release/bin/solana-validator-cuda
|
|
||||||
|
mkdir solana-release/.bin
|
||||||
|
cp solana-release-cuda/bin/solana-validator solana-release/.bin/solana-validator-cuda
|
||||||
|
cat > solana-release/bin/solana-validator-cuda <<'EOF'
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
cd "$(dirname "$0")"/..
|
||||||
|
source target/perf-libs/env.sh
|
||||||
|
if [[ -z $SOLANA_PERF_LIBS_CUDA ]]; then
|
||||||
|
echo
|
||||||
|
echo Error: CUDA not available
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
exec .bin/solana-validator-cuda "$@"
|
||||||
|
EOF
|
||||||
|
chmod +x solana-release/bin/solana-validator-cuda
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp -a scripts multinode-demo solana-release/
|
cp -a scripts multinode-demo solana-release/
|
||||||
|
@ -61,7 +61,7 @@ if [[ -z $SOLANA_PERF_LIBS_CUDA ]]; then
|
|||||||
echo No supported CUDA versions detected
|
echo No supported CUDA versions detected
|
||||||
echo
|
echo
|
||||||
echo LD_LIBRARY_PATH="$SOLANA_PERF_LIBS:$LD_LIBRARY_PATH"
|
echo LD_LIBRARY_PATH="$SOLANA_PERF_LIBS:$LD_LIBRARY_PATH"
|
||||||
export LD_LIBRARY_PATH="$SOLANA_PERF_LIBS:$SOLANA_PERF_LIBS/$SOLANA_PERF_LIBS_CUDA:$CUDA_HOME/lib64:$LD_LIBRARY_PATH"
|
export LD_LIBRARY_PATH="$SOLANA_PERF_LIBS:$LD_LIBRARY_PATH"
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
echo LD_LIBRARY_PATH="$SOLANA_PERF_LIBS:$SOLANA_PERF_LIBS/$SOLANA_PERF_LIBS_CUDA:$CUDA_HOME/lib64:$LD_LIBRARY_PATH"
|
echo LD_LIBRARY_PATH="$SOLANA_PERF_LIBS:$SOLANA_PERF_LIBS/$SOLANA_PERF_LIBS_CUDA:$CUDA_HOME/lib64:$LD_LIBRARY_PATH"
|
||||||
|
Reference in New Issue
Block a user