Skip to content

Instantly share code, notes, and snippets.

@manualbashing
Forked from daniilyar/BOINC_Rosetta_home_Ubuntu_18
Last active March 24, 2020 09:11
Show Gist options
  • Save manualbashing/10f607525d523f4811cf1e11c5ff7209 to your computer and use it in GitHub Desktop.
Save manualbashing/10f607525d523f4811cf1e11c5ff7209 to your computer and use it in GitHub Desktop.
How to install BOINC and start calculating for Rosetta@home on Ubuntu 18.04 LTS

Install BOINC

sudo -i
apt -qqy update && apt install -y --auto-remove libsm6 libxext6 libnotify-bin libcurl3 && apt -qqy clean
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
sudo systemctl enable boinc

Attach to rosettaAthome

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
`cd /opt/BOINC && boinccmd --project_attach "http://boinc.bakerlab.org/rosetta" "$ACCOUNT_KEY"`

To detach the project, use:

`cd /opt/BOINC && boinccmd --project "http://boinc.bakerlab.org/rosetta" detach`

View the BOINC logs in syslog:

tail -f /var/log/syslog

Change nice value for foldingAtHome und use BOINC as fallback

renice -n -10 -u fahclient
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment