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
|
if [[ -n $maybeCUDA ]]; then
|
||||||
# Wrap `solana-validator-cuda` with a script that loads perf-libs
|
# Wrap `solana-validator-cuda` with a script that loads perf-libs
|
||||||
# automatically
|
# automatically if possible
|
||||||
cp -a target/perf-libs solana-release/target/
|
cp -a target/perf-libs solana-release/target/
|
||||||
mkdir solana-release/.bin
|
mkdir solana-release/bin/_
|
||||||
cp solana-release-cuda/bin/solana-validator solana-release/.bin/solana-validator-cuda
|
cp solana-release-cuda/bin/solana-validator solana-release/bin/_/solana-validator-cuda
|
||||||
cat > solana-release/bin/solana-validator-cuda <<'EOF'
|
cat > solana-release/bin/solana-validator-cuda <<'EOF'
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
cd "$(dirname "$0")"/..
|
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
|
if [[ -z $SOLANA_PERF_LIBS_CUDA ]]; then
|
||||||
echo
|
echo
|
||||||
echo Error: CUDA not available
|
echo Error: SOLANA_PERF_LIBS_CUDA environment variable undefined
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
exec .bin/solana-validator-cuda "$@"
|
exec _/solana-validator-cuda "$@"
|
||||||
EOF
|
EOF
|
||||||
chmod +x solana-release/bin/solana-validator-cuda
|
chmod +x solana-release/bin/solana-validator-cuda
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue