Install for Development
Installing pre-releases with Docker
To pull the latest pre-release version:
docker pull livepeer/go-livepeer:master
Installing a binary pre-release
Binaries are produced from every GitHub commit and download links are available in the #builds channel of the Livepeer Discord server.
These binaries are produced from go-livepeer's CI process, shown in this diagram:
Build from source
System dependencies
Building livepeer
requires some system dependencies.
Linux (Ubuntu: 16.04 or 18.04):
apt-get update && apt-get -y install build-essential pkg-config autoconf git curl
Linux (Ubuntu: 20.04):
apt-get -y install protobuf-compiler-grpc golang-goprotobuf-dev
To enable transcoding using Nvidia GPUs on Linux systems
- CUDA must be installed on the system (https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html)
clang
must be installed as well. The script that will installffmpeg
dependencies useswhich clang
command to determine whetherclang
is installed or not. Please check this on your system. If the path is empty, please installclang
. For example on the Ubuntu machine one can do
apt-get -y install clang clang-tools
Darwin (macOS):
brew update && brew install pkg-config autoconf
Windows:
The steps in this file can be used as a reference.
Go
Building livepeer
requires Go. Follow the
official Go installation instructions.
Build and install
Clone the repository:
git clone https://github.com/livepeer/go-livepeer.git
cd go-livepeerInstall
ffmpeg
dependencies:./install_ffmpeg.sh
(note - this is the step that requires
which clang
to return clang path in order to build CUDA support, as described above)Set build environment variables.
Set the
PKG_CONFIG_PATH
variable so thatpkg-config
can find theffmpeg
dependency files installed in step 2:# install_ffmpeg.sh stores ffmpeg dependency files in this directory by default
export PKG_CONFIG_PATH=~/compiled/lib/pkgconfigSet the
BUILD_TAGS
variable to enable mainnet support:export BUILD_TAGS=mainnet
# To build with support for only development networks and the Rinkeby test network
# export BUILD_TAGS=rinkeby
# To build with support for only development networks
# export BUILD_TAGS=devBuild and install
livepeer
:make
cp livepeer* /usr/local/binNote for Mac M1 users If you see an error like
ld: symbol(s) not found for architecture x86_64
, this is because of a conflict between dependency builds and the Livepeer build. You should check that you are using the *-darwin-arm64 binary instead of the*-darwin-amd64
binary. You can check what Go architecture you're using withgo version
.
Build with Docker
Clone the repository:
git clone https://github.com/livepeer/go-livepeer.git
cd go-livepeerExport tags:
echo $(git describe --tags) > .git.describe
Build image:
docker build -t livepeerbinary:debian -f docker/Dockerfile.debian .