Last active
September 28, 2021 10:33
-
-
Save daniilyar/a2e7a63e87f02ba3955926178df14ec6 to your computer and use it in GitHub Desktop.
How to install BOINC and start calculating for Rosetta@home (Ubuntu 18)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Before you start: register at Rosetta website (http://boinc.bakerlab.org/rosetta/join.php) and remember your registration email and password | |
sudo -i | |
# install dependencies: | |
apt -qqy update && apt install -y --auto-remove libsm6 libxext6 libnotify-bin libcurl3 && apt -qqy clean | |
# Install BOINC: | |
cd /opt | |
wget -q https://boinc.berkeley.edu/dl/boinc_7.4.22_x86_64-pc-linux-gnu.sh -O boinc.sh | |
chmod ugo+x boinc.sh && ./boinc.sh # Will print 'use /opt/BOINC/run_manager to start BOINC' | |
cd BOINC | |
# Symlink the boinccmd tool to /usr/local/bin to make it available in PATH: | |
ln -sf /opt/BOINC/boinccmd /usr/local/bin/boinccmd | |
# Add to Systemd as a service: | |
cat <<EOT > /etc/systemd/system/boinc.service | |
[Unit] | |
Description=BOINC Daemon | |
[Service] | |
User=root | |
Nice=19 | |
ExecStart=/bin/bash -c 'cd /opt/BOINC/ && ./run_client' | |
[Install] | |
WantedBy=multi-user.target | |
EOT | |
chmod 644 /etc/systemd/system/boinc.service | |
# Start the client via systemd: | |
service boinc start | |
# Check that BOINC is running and didn't exit with error: | |
service boinc status | |
# Enable service for auto-start on boot: | |
sudo systemctl enable boinc | |
# [optional] How to get the account key: | |
# Register on https://boinc.bakerlab.org/join.php and use your registered email and password in the command below: | |
# ACCOUNT_KEY=`boinccmd --lookup_account http://boinc.bakerlab.org/rosetta '<email>' '<password>' | tail -n 1 | awk '{print $3}'` # e.g. ee2ae59487ffc6942133d6b5e7936bc4 | |
# echo "Account key: $ACCOUNT_KEY" | |
# Attach the project to boinc suing the $ACCOUNT_KEY: | |
`cd /opt/BOINC && boinccmd --project_attach "http://boinc.bakerlab.org/rosetta" "<ACCOUNT_KEY>"` | |
# View the BOINC logs in syslog: | |
tail -f /var/log/syslog | |
# To detach the project, use: `cd /opt/BOINC && boinccmd --project "http://boinc.bakerlab.org/rosetta" detach` | |
See more at https://gist.github.com/ceralena/8295224 |
Thank you daniilyar. This is just what I have been looking for. Your ACCOUNT_KEY line has a missing single-quote at the end of the awk statement.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See also https://hub.docker.com/r/daniilyar/boinc