This application implements enough of BOINC IPC to support running simple apps without real BOINC client.
For reference see in BOINC sources:
- api/boinc_api.*
- lib/api_ipc.*
- lib/shmem.*
- Prepare a destination directory for your files:
- Put absolute path to it in
dest
variable. - Run
mkdir -p $dest/{slots,projects}
.
- Put absolute path to it in
- Copy Rosetta files:
- Save boinc directory path (probably
/var/lib/boinc
, if it's running as system daemon) asboinc
variable. cp -r $boinc/projects/boinc.bakerlab.org_rosetta $dest/projects/
- Find pid (save as
rosetta_pid
) and a slot directory name (save asslot
) of a running Rosetta process usinglsof +d $boinc/slots/
. cp -r $boinc/slots/$slot $dest/slots/
- Save the command line using
ps -p $rosetta_pid -fww > $dest/slots/$slot/run.sh
. Edit the file so it looks like#!/bin/sh exec ../../projects/boinc.bakerlab.org_rosetta/rosetta_4.20_x86_64-pc-linux-gnu [...]
sed -i 's|<client_pid>[0-9]*</client_pid>|<client_pid>1</client_pid>|' $dest/slots/$slot/init_data.xml
- If you want to share the package safely with others:
for tag in user_name authenticator userid teamid hostid user_total_credit user_expavg_credit host_total_credit host_expavg_credit; do sed -i "s|<${tag}>.*</${tag}>|<${tag}></${tag}>|" $dest/slots/$slot/init_data.xml; done
- Save boinc directory path (probably
- Build this as a static binary.
cp target/x86_64-unknown-linux-musl/release/boinc-supervisor $dest/slots/$slot/
docker run -v "${dest}:${boinc}" -ti --rm -u "$(id -u):$(id -g)" alpine sh
Warning: it's important that the$boinc
path inside container is the same as it was on host system.- Inside docker:
- Remember, that's it's a new shell, so you don't have your
boinc
andslot
variables. cd $boinc/slots/$slot
./boinc-supervisor &
./run.sh
- Remember, that's it's a new shell, so you don't have your
- Download docker image
or build your own
docker pull docker.pkg.github.com/golemfactory/boinc-supervisor/boinc-supervisor:latest
cd docker ./build.sh
- Run
The first parameter is a path to slot directory. Entrypoint script will launch boinc-supervisor there. Next parameters will be used as a command and arguments to be launched there. In this example it's
docker run -d -v "${dest}:${boinc}" --rm -u "$(id -u):$(id -g)" boinc-supervisor "${boinc}/slots/${slot}/" ./run.sh
run.sh
without arguments.
Have a look at wiki.