Skip to content

Commit

Permalink
Developersteve/readme update (#65)
Browse files Browse the repository at this point in the history
* Initial readme cleanup and update

* additional link and text clean up

---------

Co-authored-by: DeveloperSteve <[email protected]>
  • Loading branch information
developersteve and DeveloperSteve authored May 9, 2024
1 parent 7e0e0c1 commit 05de004
Showing 1 changed file with 15 additions and 105 deletions.
120 changes: 15 additions & 105 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,89 +1,20 @@
# Lilypad v2 🍃
# Lilypad 🍃

This cloud is just someone else's computer.
Lilypad enables users to run containerised AI workloads easily in a decentralized GPU network, where anyone can get paid to connect their compute nodes to the network and run container jobs. Users have access to easily run jobs such as Stable Diffusion XL and cutting edge open source LLMs both on chain, from CLI and via [Lilypad AI Studio](https://app.lilypad.tech) on the web.

![image](https://raw.githubusercontent.com/Lilypad-Tech/lilypad/main/assets/xkcd-the-cloud.png)
Visit the [Lilypad Docs](https://docs.lilypad.tech/) site for a more comprehensive overview to getting up and running incluing a [Quick Start Guide](https://lilypad.team/quickstart)

Lilypad enables users to run AI workloads easily in a decentralized GPU network where anyone can get paid to connect their compute nodes to the network and run jobs. Users have access to easy Stable Diffusion XL and cutting edge open source LLMs both on chain, from CLI and via [Lilypad AI Studio](https://lilypad.tech) on the web.
## Getting started running container jobs on Lilypad

# Getting started
Jobs (containers) can be run on Lilypad by utilising the [Installable CLI](https://lilypad.team/cli), also available for installation through the [Go toolchain](https://lilypad.team/cligo). After setting up the necessary pre-requisites, the CLI enables users to run jobs as described below:

Welcome to the prerelease series of Lilypad v2.

## Aurora Testnet

The testnet has a base curency of ETH and you will also get LP to pay for jobs (and nodes to stake).

Metamask:

```
Network name: Lilypad v2 Aurora testnet
New RPC URL: http://testnet.lilypad.tech:8545
Chain ID: 1337
Currency symbol: ETH
Block explorer URL: (leave blank)
```

### Fund your wallet with ETH and LP

To obtain funds, go to [https://faucet.lilypad.tech](https://faucet.lilypad.tech).

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

## Install CLI

Download the latest release of Lilypad for your platform. Both the amd64/x86_64 and arm64 variants of macOS and Linux are supported. (If you are on Apple Silicon, you'll want arm64).

Nb: to check your version use ```which lilypad``` - if you're an old version run ```rm <path>``` to remove it, then install the newest version. You'll want to stay up-to-date to remain compatible with Lilypad as it evolves.

The commands below will automatically detect your computer's OS and processor architecture and download the correct Lilypad build for your machine.

```
# Detect your machine's architecture and set it as $OSARCH
OSARCH=$(uname -m | awk '{if ($0 ~ /arm64|aarch64/) print "arm64"; else if ($0 ~ /x86_64|amd64/) print "amd64"; else print "unsupported_arch"}') && export OSARCH
# Detect your operating system and set it as $OSNAME
OSNAME=$(uname -s | awk '{if ($1 == "Darwin") print "darwin"; else if ($1 == "Linux") print "linux"; else print "unsupported_os"}') && export OSNAME;
```
Then, download & install:
```
# Download the latest production build
curl https://api.github.com/repos/lilypad-tech/lilypad/releases/latest | grep "browser_download_url.*lilypad-$OSNAME-$OSARCH" | cut -d : -f 2,3 | tr -d \" | wget -qi - -O lilypad
# Make Lilypad executable and install it
chmod +x lilypad
sudo mv lilypad /usr/local/bin/lilypad
```

You can also, at your option, choose to compile Lilypad using Go and install it that way on any machine that supports the Go toolchain.

## Run a job

```
export WEB3_PRIVATE_KEY=<your private key>
```
(or arrange for the key to be in your environment in a more secure way that doesn't get written to your shell history)

### Cows
```
lilypad run cowsay:v0.0.3 -i Message="moo"
```

### SDXL
```
lilypad run sdxl-pipeline:v1.0-base-lilypad3 -i Prompt='beautiful view of iceland with a record player' -i Steps=200
```

![image-42](https://github.com/lilypad-tech/lilypad/assets/264658/d48bb897-79a0-4f3a-b938-e85a8cfa3f0e)

## Run a node, earn LP
```
lilypad serve
```

systemd units & more details [here](https://github.com/lilypad-tech/lilypad/tree/main/ops)

## Available modules
[![Watch the video](https://img.youtube.com/vi/Ep9ML9h8DTE/0.jpg)](https://www.youtube.com/watch?v=Ep9ML9h8DTE)

Check the github releases page for each module or just use the git hash as the tag.
The current list of modules can be found in the following repositories:

* [sdxl](https://github.com/lilypad-tech/lilypad-module-sdxl)
* [stable-diffusion](https://github.com/lilypad-tech/lilypad-module-stable-diffusion)
Expand All @@ -95,40 +26,19 @@ Check the github releases page for each module or just use the git hash as the t
* [wasm](https://github.com/lilypad-tech/lilypad-module-wasm)
* [cowsay](https://github.com/lilypad-tech/lilypad-module-cowsay)

## Write a module

A module is just a Git repository with job information, usually associated with a Docker container.

Module versions are based on tags.

In your repository, create a file called `lilypad_module.json.tmpl`
Containerized job modules can be built and added to the available module list; for more details visit the [building a job](https://lilypad.team/building) documentation. If you would like to contribute, open a pull request on this repository to add your link to the list above.

See [cowsay](https://github.com/lilypad-tech/lilypad-module-cowsay) for example.

This is a JSON template with Go text/template style `{{.Message}}` sections which will be replaced by Lilypad with json encoded inputs to modules. You can also do fancy things with Go templates like setting defaults, see cowsay for example.

While developing a module, you can use the git hash to test it.

Pass inputs as:
```
lilypad run github.com/username/repo:tag -i Message=moo
```
## Getting started running a Node on Lilypad Network

Inputs are a map of strings to strings.
As a distributed network lilypad also brings with it the ability to run as a node and contribute to the GPU and compute capabilities. See the documentation on [running a node](https://lilypad.team/node) which contains more details instructions and overview for getting set up.

**YOU MUST MAKE YOUR MODULE DETERMINISTIC**
## The Lilypad Community

Tips:
* Make the output reproducible, for example for the diffusers library, see [here](https://huggingface.co/docs/diffusers/using-diffusers/reproducibility)
* Strip timestamps and time measurements out of the output, including to stdout/stderr
* Don't read any sources of entropy (e.g. /dev/random)
* When referencing docker images, you MUST specify their sha256 hashes, as shown in this example
[Read our Blog](https://lilypad.team/blog)

If your module is not deterministic, compute providers will not adopt it and blacklist your module
[Join the Discord](https://lilypad.team/discord)

### Module-Next
We've got a new style of setting environment variables (and other useful templating) to allow for injection of user-provided variables without allowing unsafe text.
[Follow us on Twitter/X](https://lilypad.team/x)

`"{{ if .Prompt }}{{ subst "PROMPT=%s" .Prompt }}{{ end }}",`
[Check out our videos on YouTube](https://lilypad.team/youtube)

This example will insert the contents of Prompt (`-i Prompt="some prompt"`) as the environment variable $PROMPT.

0 comments on commit 05de004

Please sign in to comment.