Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snap cuda fullnode #393

Merged
merged 4 commits into from
Jun 21, 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
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,20 @@ demo completes after it has convinced itself the testnet won't process any addit
transactions. You should see several TPS measurements printed to the screen. In the
multinode variation, you'll see TPS measurements for each validator node as well.

Linux Snap
---
A Linux Solana [Snap](https://snapcraft.io/) is available, which can be used to
easily get Solana running on supported Linux systems without building anything
from source. The `edge` Snap channel is updated daily with the latest
development from the `master` branch. To install:
```bash
$ sudo snap install solana --edge --devmode
```
(`--devmode` flag is required only for `solana.fullnode-cuda`)

Once installed the usual Solana programs will be available as `solona.*` instead
of `solana-*`. For example, `solana.fullnode` instead of `solana-fullnode`.

Developing
===

Expand Down
6 changes: 3 additions & 3 deletions ci/buildkite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ steps:
- command: "ci/test-erasure.sh"
name: "erasure"
timeout_in_minutes: 20
agents:
- "queue=cuda"
- wait
- command: "ci/docker-run.sh snapcraft/xenial-amd64 ci/publish-snap.sh"
- command: "ci/publish-snap.sh"
timeout_in_minutes: 20
name: "publish snap"
agents:
- "queue=cuda"
- command: "ci/publish-crate.sh"
timeout_in_minutes: 20
name: "publish crate"
Expand Down
7 changes: 7 additions & 0 deletions ci/docker-snapcraft/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM snapcraft/xenial-amd64

# Update snapcraft to latest version
RUN apt-get update -qq \
&& apt-get install -y snapcraft \
&& rm -rf /var/lib/apt/lists/* \
&& snapcraft --version
6 changes: 6 additions & 0 deletions ci/docker-snapcraft/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash -ex

cd "$(dirname "$0")"

docker build -t solanalabs/snapcraft .
docker push solanalabs/snapcraft
42 changes: 41 additions & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ description: |
710,000 tx/s with off-the-shelf hardware and no sharding.
Scales with Moore's Law.
grade: devel
confinement: strict

# TODO: solana-perf-fullnode does not yet run with 'strict' confinement due to the
# CUDA dependency, so use 'devmode' confinement for now
confinement: devmode

apps:
fullnode:
Expand All @@ -14,6 +17,12 @@ apps:
- network
- network-bind
- home
fullnode-cuda:
command: solana-fullnode-cuda
plugs:
- network
- network-bind
- home
fullnode-config:
command: solana-fullnode-config
plugs:
Expand All @@ -27,8 +36,39 @@ apps:
command: solana-mint
mint-demo:
command: solana-mint-demo
client-demo:
command: solana-client-demo

parts:
solana-perf-package:
plugin: dump
build-attributes: [no-system-libraries]
source: https://solana-perf.s3.amazonaws.com/master/x86_64-unknown-linux-gnu/solana-perf.tgz
prime:
- solana-perf-HEAD.txt
solana-cuda:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be named solana-perf?

plugin: rust
rust-channel: stable
rust-features:
- erasure
- cuda
prime:
- bin/solana-fullnode-cuda
- usr/lib/libgf_complete.so.1
- usr/lib/libJerasure.so.2
override-build: |
cp -f $SNAPCRAFT_STAGE/libcuda_verify_ed25519.a .
cp -f $SNAPCRAFT_STAGE/libJerasure.so .
cp -f $SNAPCRAFT_STAGE/libgf_complete.so .
snapcraftctl build
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 libJerasure.so $SNAPCRAFT_PART_INSTALL/usr/lib/libJerasure.so.2
cp -f libgf_complete.so $SNAPCRAFT_PART_INSTALL/usr/lib/libgf_complete.so.1
after:
- solana-perf-package
solana:
plugin: rust
rust-channel: stable