Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Remove CUDA support from Snap #1796

Merged
merged 2 commits into from
Nov 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion net/gce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ $(
install-rsync.sh \
network-config.sh \
remove-docker-interface.sh \
update-default-cuda.sh \

)

Expand Down
7 changes: 6 additions & 1 deletion net/remote/remote-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ snap)
"

if [[ -e /dev/nvidia0 ]]; then
commonNodeConfig="$commonNodeConfig enable-cuda=1"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo
echo "WARNING: GPU detected by snap builds to not support CUDA."
echo " Consider using instances with a GPU to reduce cost."
echo
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
fi

if [[ $nodeType = leader ]]; then
Expand Down
10 changes: 0 additions & 10 deletions net/scripts/update-default-cuda.sh

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/snap-config-to-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@

if [[ -d $SNAP ]]; then # Running inside a Linux Snap?
RUST_LOG="$(snapctl get rust-log)"
SOLANA_CUDA="$(snapctl get enable-cuda)"
SOLANA_DEFAULT_METRICS_RATE="$(snapctl get default-metrics-rate)"
SOLANA_METRICS_CONFIG="$(snapctl get metrics-config)"

export RUST_LOG
export SOLANA_CUDA
export SOLANA_DEFAULT_METRICS_RATE
export SOLANA_METRICS_CONFIG
fi
Expand Down
25 changes: 1 addition & 24 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ apps:
- network
- network-bind
- home
fullnode-cuda:
command: solana-fullnode-cuda
plugs:
- network
- network-bind
- home
fullnode-config:
command: solana-fullnode-config
plugs:
Expand Down Expand Up @@ -97,24 +91,7 @@ parts:
- scripts
- usr/lib
override-build: |
# Install CUDA 9.2 runtime
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/lib/nvidia-396/
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/lib/x86_64-linux-gnu/
cp -rav /usr/local/cuda-9.2/targets/x86_64-linux/lib/libcudart.so* $SNAPCRAFT_PART_INSTALL/usr/lib
cp -rav /usr/lib/x86_64-linux-gnu/libcuda.so* $SNAPCRAFT_PART_INSTALL/usr/lib/x86_64-linux-gnu/
cp -v /usr/lib/nvidia-396/libnvidia-fatbinaryloader.so* $SNAPCRAFT_PART_INSTALL/usr/lib/nvidia-396/

# Build/install solana-fullnode-cuda
./fetch-perf-libs.sh
cargo install --features=cuda --root $SNAPCRAFT_PART_INSTALL --bin solana-fullnode
mv $SNAPCRAFT_PART_INSTALL/bin/solana-fullnode $SNAPCRAFT_PART_INSTALL
rm -rf $SNAPCRAFT_PART_INSTALL/bin/*
mv $SNAPCRAFT_PART_INSTALL/solana-fullnode $SNAPCRAFT_PART_INSTALL/bin/solana-fullnode-cuda
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/lib/
cp -f target/perf-libs/libJerasure.so $SNAPCRAFT_PART_INSTALL/usr/lib/libJerasure.so.2
cp -f target/perf-libs/libgf_complete.so $SNAPCRAFT_PART_INSTALL/usr/lib/libgf_complete.so.1

# Build/install all other programs
# Build/install all programs
cargo install --root $SNAPCRAFT_PART_INSTALL --bins

# Install native programs
Expand Down