CoopHive
  • CoopHive
    • Introduction
    • Architecture
    • Whitepaper
  • User Guide
    • Install CoopHive
    • Clients
      • Quick Start
    • Compute Nodes
      • Quick Start
    • Solver
      • Quick Start
  • Creating Jobs
    • Job Modules
  • Research
    • Game-Theoretic Verifiable Computing
      • Writings
        • Verifiable Computing
        • Problem Statement
        • Prior Protocols
        • Autonomous Agents
        • Mechanisms To Explore
      • Talks
        • FIL Dev Summit, Reykjavík, September 2023
        • CoD Summit, Boston, May 2023
    • Autonomous Agents
      • Valory Crypto x AI Mini Conference, July 2023
Powered by GitBook
On this page
  • Prerequisites
  • Install Bacalhau
  • Install CoopHive
  • Write .env file
  • Install systemd unit for Bacalhau
  • Install systemd unit for GPU provider
  • Security
  • Allowlisting Modules

Was this helpful?

Edit on GitHub
  1. User Guide
  2. Compute Nodes

Quick Start

The testnet has a base currency of ETH, as well as a token called HIVE. HIVE is used for payments and collateralization.

Prerequisites

  • A private key and funds for the testnet

    • See the instructions in Quick Start to set up MetaMask and use the faucet to receive initial funds

  • Linux (latest Ubuntu LTS recommended)

  • Docker

  • Nvidia GPU

  • Nvidia drivers

  • Nvidia docker drivers

Install Bacalhau

cd /tmp
wget https://github.com/bacalhau-project/bacalhau/releases/download/v1.0.3/bacalhau_v1.0.3_linux_amd64.tar.gz
tar xfv bacalhau_v1.0.3_linux_amd64.tar.gz
sudo mv bacalhau /usr/bin/bacalhau
sudo mkdir -p /app/data/ipfs
sudo chown -R $USER /app/data

Install CoopHive

curl -sSL -o hive https://github.com/CoopHive/hive/releases/download/v0.1.12/hive-linux-amd64
chmod +x hive
sudo mv hive /usr/bin/

Write .env file

Create a .env file for your node. /app/coophive/resource-provider-gpu.env should contain:

WEB3_PRIVATE_KEY=<your private key>

Caution: do not use the same key for both client and compute node, even for testing.

Install systemd unit for Bacalhau

Open /etc/systemd/system/bacalhau.service and paste the following:

[Unit]
Description=CoopHive v0
After=network-online.target
Wants=network-online.target systemd-networkd-wait-online.service

[Service]
Environment="LOG_TYPE=json"
Environment="LOG_LEVEL=debug"
Environment="HOME=/app/coophive"
Environment="BACALHAU_SERVE_IPFS_PATH=/app/data/ipfs"
Restart=always
RestartSec=5s
ExecStart=/usr/bin/bacalhau serve --node-type compute,requester --peer none --private-internal-ipfs=false

[Install]
WantedBy=multi-user.target

Install systemd unit for GPU provider

Open /etc/systemd/system/coophive-resource-provider.service and paste the following:

[Unit]
Description=CoopHive v0 Resource Provider GPU
After=network-online.target
Wants=network-online.target systemd-networkd-wait-online.service

[Service]
Environment="LOG_TYPE=json"
Environment="LOG_LEVEL=debug"
Environment="HOME=/app/coophive"
Environment="OFFER_GPU=1"
EnvironmentFile=/app/coophive/resource-provider-gpu.env
Restart=always
RestartSec=5s
ExecStart=/usr/bin/coophive resource-provider

[Install]
WantedBy=multi-user.target

Reload systemd's units/daemons. This needs to be repeated if the systemd files above are modified.

sudo systemctl daemon-reload

Start systemd units:

sudo systemctl start bacalhau
sudo systemctl start coophive-resource-provider

Use systemctl to check the status, and debug with journalctl if needed. For example,

sudo journalctl -uf coophive-resource-provider

will stream the output from your CoopHive node. Records of the resource provider accepting jobs can be found in the logs.

Security

Allowlisting Modules

Set the environment variable OFFER_MODULES in the GPU provider to a comma separated list of module names of allowed modules.

PreviousCompute NodesNextSolver

Last updated 1 year ago

Was this helpful?