solana-validator-cuda wrapper is now net.sh compatible
This commit is contained in:
parent
078a3aeccd
commit
4b1de02bbb
|
@ -80,21 +80,23 @@ echo --- Creating tarball
|
|||
|
||||
if [[ -n $maybeCUDA ]]; then
|
||||
# Wrap `solana-validator-cuda` with a script that loads perf-libs
|
||||
# automatically
|
||||
# automatically if possible
|
||||
cp -a target/perf-libs solana-release/target/
|
||||
mkdir solana-release/.bin
|
||||
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 [[ -f target/perf-libs/env.sh ]]; then
|
||||
source target/perf-libs/env.sh
|
||||
fi
|
||||
if [[ -z $SOLANA_PERF_LIBS_CUDA ]]; then
|
||||
echo
|
||||
echo Error: CUDA not available
|
||||
echo Error: SOLANA_PERF_LIBS_CUDA environment variable undefined
|
||||
exit 1
|
||||
fi
|
||||
exec .bin/solana-validator-cuda "$@"
|
||||
exec _/solana-validator-cuda "$@"
|
||||
EOF
|
||||
chmod +x solana-release/bin/solana-validator-cuda
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue