Distributive docker worker for the World Community Grid - Legendre Pair 117 project
1.2K
Running the docker worker can be as simple as issuing the following docker command:
docker run distributivenetwork/dcp-worker:latest
However, you can pass the following options to it to configure how it behaves to suit your preferences and system.
This particular docker has been configured to work on the World Community Grid network by joining its group.
--------8<--------
dcp-worker - Standalone NodeJS DCP Worker
Copyright (c) 2020 Distributive Corp Ltd., All Rights Reserved.
To view the common DCP options, use the --help flag with --dcp-options.
DCP Common Options
--dcp-scheduler Specify a scheduler's URL to connect to/fetch dcp-client
from [string]
Output options
-v, --verbose Enable verbose output [count] [default: false]
-o, --outputMode, --output Set the output mode
[string] [choices: "detect", "console", "dashboard", "event-log", "syslog",
"logfile"] [default: "detect"]
--reportInterval If set, output a status summary every [interval]
seconds in console output mode [number]
Identity options
--identityKey Identity key, in hex format [string]
--identityKeystore Identity keystore, in json format [string]
Log File output options
--logfile Path to log file (if --output=file) [string]
Syslog output options
--syslogAddress Address of rsyslog server (if --output=syslog) [string]
--syslogTransport Transport to connect to rsyslog daemon (if
--output=syslog) [string] [choices: "udp", "tcp"]
--syslogPort UDP/TCP port of rsyslog server [number]
Options:
-h, --help Show help, use with commands to show
detailed command help: node <cmd> --help
[boolean]
--show-hidden, --dcp-options Show hidden options, and DCP common options
(must be used with the --help flag)[boolean]
--paymentAddress The address to deposit funds into, will use
the default bank keystore if not provided.
[string]
-c, --cores Number of cores to work with
[number] [default: numCores-1]
-H, --hostname Evaluator hostname
[string] [default: "localhost"]
-p, --port Evaluator port [number] [default: 9000]
-P, --priorityOnly Set the priority mode [deprecated]
[boolean] [default: false]
-j, --job-id Restrict worker to a specific job (use N
times for N jobs) [array]
-g, --join Join compute group; the format is
"joinKey,joinSecret" or
"joinKey,eh1-joinHash" [array]
--leavePublicGroup Do not fetch slices from public compute
group [boolean] [default: false]
--publicGroupFallback If set, worker will prefer private groups
but fall back on the public group if no
preferred work is available
[boolean] [default: false]
--eventDebug If set, dump all sandbox and worker events
-a, --allowedOrigins modify the 'any' allow origins of dcpConfig
[array]
--replPort If set, open a REPL on specified TCP port
[number]
-------->8--------
The default keystore is used to identify the DCP Bank Account into which
compute credits that are earned by the worker are deposited. If you're
withdrawing compute credits to get a job done you'll need to use the default
keystore to authorize the withdrawal from your account as it will have the
private key that allows access to it, however, if you're only doing work and
earning credits, you only need the public key associated with the default
keystore, which uniquely identifies the account on the bank. You must create a
Bank Account on the portal (found at https://dcp.cloud) then copy its public
address into your clipboard and paste it into the command line you use to
start the docker worker. As the worker does work and earns compute credits,
you'll be able to monitor your bank balance in the portal. You can in fact
pass any of the arguments above on the docker command line and they'll be read
by the worker which will behave accordingly.
An example command doing this would be:
docker run distributivenetwork/dcp-worker:latest --paymentAddress=<bankID>
When the worker starts up in a new docker container, it autogenerates its
identity keystore which uniquely identifies the worker to the DCP Scheduler.
Autogenerating the identity keystore is a simpler solution to the problem of
having to configure a unique identity manually and then trying to copy it in
the right place inside the docker's filesystem. If you are working with
ephemeral dockers than this will happen each time you restart the docker.
If you are not using ephemeral dockers than the container will remember the options you pass to it including things like payment address so you can merely restart the container to put it back to work.
Here are the common options to keep in mind.
--paymentAddress=<bankAccountAddress>
Obtain an account at https://dcp.cloud and copy the account address into the command option.
-c <number>
This sets the number of sandboxes to run. The default is the number of cores detected minus 1, however, if you have hyperthreading (which is most modern CPUs) you may wish to set this explicitly as each hypterthread will be identified as a core, which can result in performance loss as generally each core has only one arithmetic unit associated with it, leading to congestion in the core as the two threads share the same arithmetic-logic unit.
-g "<computeGroupName>,<computeGroupPassword>"
This will tell the worker to join a compute group to take jobs addressed to
that group. A worker can join multiple groups, with -g "groupInfo" -g "groupInfo"
--leavePublicGroup
This instructs the worker to not take jobs destined for the default public group. This is intended for people running workers that are being dedicated to a particular set of work being created and who do not wish them to take public work if the compute group runs out of work temporarily.
--publicGroupFallback
This instructs the worker to always check its groups before asking the public group for work and is a middle ground between the worker taking any work it finds as soon as it finds it and only taking work from its groups. This has the worker checking its groups before taking work from the public group.
Content type
Image
Digest
sha256:a6d2b4364…
Size
172.5 MB
Last updated
about 3 years ago
docker pull distributivenetwork/distributive-wcg-worker