diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cb0be0d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# IDE's +.vscode diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cd7c599 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM nvidia/cuda:11.8.0-base-ubuntu22.04 + +ENV NVIDIA_DRIVER_CAPABILITIES=all + +# Install required packages +RUN apt-get update && apt-get install -y \ + wget \ + tar \ + && rm -rf /var/lib/apt/lists/* + +# Download and extract the Titan Node pool binary +RUN wget https://github.com/Livepool-io/transcoder/releases/download/v0.5.28/0.5.28-80b8f968_livepool-linux-amd64.tar.gz && \ + tar -xzf 0.5.28-80b8f968_livepool-linux-amd64.tar.gz && \ + rm 0.5.28-80b8f968_livepool-linux-amd64.tar.gz && \ + mv ./livepool-linux-amd64/livepool /usr/local/bin + +# Set the entrypoint to start the Titan Node pool binary with command line arguments +ENTRYPOINT ["/usr/local/bin/livepool"] diff --git a/README.md b/README.md index d70f7f8..fd8e73b 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ -# Livepool Video Miner +# Livepool Video Miner -## Installation +## Installation 1. Download the latest release for your OS from the [releases page](https://github.com/Livepool-io/transcoder/releases/) -2. Unpack the archive. - - .zip : use winzip or winRAR +2. Unpack the archive. + - .zip : use winzip or winRAR - .tar : `$ tar -zxvf livepool-$(YOUR_PLATFORM)-amd64.tar.gz` 3. Move the binary to your executable `PATH` -4. Find your GPU PCIe IDs using `nvidia-smi` , this corresponds to your PCIe 16x slots, i.e. if you have one slot with one GPU your ID will be 0. +4. Find your GPU PCIe IDs using `nvidia-smi` , this corresponds to your PCIe 16x slots, i.e. if you have one slot with one GPU your ID will be 0. 5. Start livepool @@ -19,6 +19,35 @@ $ livepool -ethAcctAddr $(YOUR_ETH_ADDRESS) -nvidia $(PCIe IDs comma-separated) ``` - `$(YOUR_ETH_ADDRESS)` - Your ethereum address to receive payouts. If you don't have an ethereum account download an ethereum wallet such as [Metamask](https://metamask.io/). -- `$(PCIe IDs comma-separated)` - The PCIe IDs for your GPUs. +- `$(PCIe IDs comma-separated)` - The PCIe IDs for your GPUs. Example: `$ livepool -ethAcctAddr 0xF5ba856B4DBfBf3A56b01eFd0697fc188cE1aFD8 -nvidia 0,1` + +# Containerized Operation (Experimental) + +Within this repository, you'll discover a [Dockerfile](Dockerfile) and [docker-compose.yml](docker-compose.yml) file, offering a method to encapsulate the LivePool pool within a Docker container. It's essential to note that this configuration is still in the experimental phase and isn't recommended for production environments. Should you choose to embark on this journey, adhere to the following guidelines: + +1. **Docker Deployment**: Commence by installing Docker on your Linux machine. For guidance, refer to the [official Docker installation documentation](https://docs.docker.com/engine/install/ubuntu/). + +2. **Nvidia Container Toolkit Integration**: Ensure your system is fortified with the [Nvidia container toolkit](https://github.com/NVIDIA/nvidia-container-toolkit). + +3. **Image Construction**: Execute the subsequent command to construct the Docker image: + +```bash +docker build -t livepool-pool . +``` + +4. **Container Launch**: Initiate the container using the following command. Remember to substitute `` with your Ethereum address, `` with your designated identifier and `` with your desired session count: + +```bash +docker run --runtime nvidia livepool-pool -ethAcctAddr +``` + + > \[!NOTE] + > If a discreet background operation suits your preferences, orchestrate it via Docker Compose: +> +>```bash +>docker compose up -d +>``` +> +> During this process, update the [docker-compose.yml](docker-compose.yml) file with your precise ETH address, orchestrator secret and max sessions count. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d00a8ed --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,19 @@ +version: "3.8" + +name: livepool + +services: + video-miner-pool: + build: . + image: livepool-pool + container_name: livepool-pool + restart: unless-stopped + runtime: nvidia + volumes: + - "/etc/timezone:/etc/timezone:ro" # Set timezone to host timezone. + - "/etc/localtime:/etc/localtime:ro" # Set time to host time. + command: ["-ethAcctAddr", ""] + +networks: + default: + name: livepool_pool