Docker

Instructions for setting up a Resource Provider (node) on the public Lilypad testnet using Docker, including obtaining necessary funds and installing required software.

Prerequisites

Lilypad RPs currently only support Linux installs. Running a RP on Windows is currently experimental.

For a more in-depth look at the requirements to run a Lilypad node, please refer to the hardware requirements documentation.

Network information and testnet tokens

The testnet has a base currency of ETH, as well as a utility token called LP. Both are used for running nodes. To add a node to the testnet, follow these steps:

Metamask

We recommend using MetaMask with custom settings to make things easier. Once you have it installed and setup, here are the settings you need to use:

Network name: Arbitrum Sepolia

New RPC URL: https://sepolia-rollup.arbitrum.io/rpc

Chain ID: 421614

Currency symbol: ETH

Block explorer URL: (leave blank)

For a step by step guide on adding the network, please refer to our Setting up MetaMask documentation.

Fund your wallet with ETH and LP

To obtain testnet LP, use the Lilypad faucet and enter your ETH address.

To obtain testnet ETH, use a third party Arbitrum Sepolia testnet faucet and enter your ETH address.

The Arbitrum Sepolia faucet provides 0.0001 tokens per request. If you need more tokens and already have Sepolia ETH, you can use the official Arbitrum bridge to transfer it over to Arbitrum Sepolia.

The faucet will give you both ETH (to pay for gas) and LP (to stake and pay for jobs).

Installation

To set up your environment for running a Lilypad Resource Provider, you'll need to install and configure several key components.

Pull the pre-built Docker image

The pre-built Docker image is a crucial component in setting up your Lilypad Resource Provider with this approach. It encapsulates the environment in which your node will operate, including all necessary dependencies, configurations, and commands to run the Lilypad services.

Before pulling the image, you must be logged in to Docker by running docker login and follow the prompts.

In the root directory of the Lilypad repo, run the following command to pull the pre-built Docker image:

docker pull ghcr.io/lilypad-tech/resource-provider:latest

Setup Arbitrum RPC

The Lilypad Network uses the Arbitrum Sepolia Testnet to settle compute transactions. When a transaction is ready to be saved on-chain, Lilypad cycles through a list of public Arbitrum Sepolia RPC endpoints using the endpoint that settles first to save the compute transaction.

Resource Providers have the option to setup their own Arbitrum RPC endpoint using Alchemy instead of using the default public RPC endpoints.

A personal RPC endpoint helps RPs to avoid reliability issues with the public RPC endpoints used by Lilypad ensuring rewards can be earned and jobs can be run consistently. RPs running a personal RPC endpoint contribute to the fault tolerance and decentralization of the Lilypad Network! Read more in the Alchemy Arbitrum docs.

Usage

Before we run the Docker image, we will need to retrieve the private key from your wallet you set up in the first steps of this guide. You can find out how to do that using this official MetaMask guide for exporting your private key. Once you've copied your private key we can move on and run the Docker image.

Run the Docker Image

Important: Safeguard your private key with proper key management practices. This key is crucial for managing resource providers' proof of work, tracking rewards, and other vital functions. Never share or expose it.

To run the Lilypad services in a container as a background process, replace <your_private_key_here> with your actual private key and execute the following command:

docker run -d --name lilypad-resource-provider --gpus all -e WEB3_PRIVATE_KEY=<private key> --restart always ghcr.io/lilypad-tech/resource-provider:latest

To add your own RPC URL, run add the WEB3_RPC_URL as an environment variable and set the URL:

docker run -d --gpus all -e WEB3_PRIVATE_KEY=<private-key> -e WEB3_RPC_URL=wss://arb-sepolia.g.alchemy.com/v2/some-id-from-alchemy --restart always ghcr.io/lilypad-tech/resource-provider:latest

Enable Automatic Updates

To automatically monitor and update the Lilypad resource provider container, you can use lilypad-watchtower. It ensures the container is kept up to date by periodically checking for new image versions.

Run the following command to start lilypad-watchtower:

docker run -d --name lilypad-watchtower --restart always -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower lilypad-resource-provider --interval 300

When you want to check the logs, run the following command:

docker logs -f --tail 50 lilypad-resource-provider

If everything has ran successfully, you will see logs from your terminal. You can copy your web3 public address from MetaMask and paste it in to the Lilypad Leaderboard or GPU dashboard to view if your node is online and running!

View Lilybit_ rewards

To view your Lilybit_ rewards, visit one of the following dashboards and paste your node's public address into the input:

Troubleshooting

Here are some common troubleshooting techniques when it comes to your resource provider using Docker:

Checking Docker Runtime To verify your Docker runtime configuration: sudo docker info | grep Runtimes

You should see the NVIDIA runtime listed. If you only see: Runtimes: io.containerd.runc.v2 runc you will need to configure the NVIDIA runtime.

Configuring NVIDIA Runtime If the NVIDIA runtime is not showing up or you're experiencing issues, try the following:

1. Configure the NVIDIA Container Toolkit runtime: sudo nvidia-ctk runtime configure --runtime=docker 2. Restart the Docker service: sudo systemctl restart docker

Overview of Docker setup For a comprehensive overview of your Docker setup, use: docker info. This command provides detailed information about your Docker daemon configuration.

Last updated

Logo