Skip to content

Installation instructions

w4ffl35 edited this page Apr 17, 2023 · 47 revisions

💿 Compiled installation (recommended)

The best way to use AI Runner is by downloading the official build from itch.io or by using the [https://itch.io/app](itch.io app) which will allow you to easily update AI Runner, keep up with the devlogs and more.


💻 Development installation

If you would like contribute towards development, or want to use the bleeding edge version of AI Runner you can do so in three different ways - Docker, pypi or bare-metal.

Prerequisites

  • Ubuntu 20.04+ or Windows 10+
  • Python 3.10.6
  • pip-23.0.1

🔧 Source and PyPi

Follow these steps to install AI Runner from source or pypi

Install required libraries

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117

On Windows

pip install https://github.com/acpopescu/bitsandbytes/releases/download/v0.38.0-win0/bitsandbytes-0.38.1-py3-none-any.whl

On Linux

pip install bitsandbytes triton

# txt2vid support on linux:
sudo apt-get install ubuntu-restricted-extras

Source installation

Clone handler and install

git clone -b develop https://github.com/Capsize-Games/aihandler.git
cd aihandler && pip install -e .

Clone AI Runner and install

git clone -b develop https://github.com/Capsize-Games/airunner.git
cd airunner && pip install -e . --no-deps

Run

python airunner/src/airunner/main.py

Pypi Installation

Currently there isn't much of an external API so using AI Runner as a library is not recommended.

Install AI Runner

pip install airunner

🔧 Docker

Current builds of AI Runner are compiled with pyinstaller on docker.

Pull Docker container from repo

Linux

docker pull ghcr.io/capsize-games/airunner/airunner:linux

Windows

docker pull ghcr.io/capsize-games/airunner/airunner:windows

Build Docker

Linux

docker-compose -f docker-compose.yml build
docker tag ghcr.io/capsize-games/airunner/airunner:linux ghcr.io/capsize-games/airunner/airunner:linux
docker push ghcr.io/capsize-games/airunner/airunner:linux

Windows

docker-compose -f docker-compose.windows.yml build
docker tag ghcr.io/capsize-games/airunner/airunner:windows ghcr.io/capsize-games/airunner/airunner:windows
docker push ghcr.io/capsize-games/airunner/airunner:windows

Run the app using Docker

docker-compose run linux python3 /app/main.py

Build latest version of AI Runner using Docker locally - this will output a build and dist folder on your machine.

Linux

docker run -it -e DEV_ENV=0 -e AIRUNNER_ENVIRONMENT=prod -e AIRUNNER_OS=linux -e PYTORCH_CUDA_ALLOC_CONF=garbage_collection_threshold:0.9,max_split_size_mb:512 -e NUMBA_CACHE_DIR=/tmp/numba_cache -e DISABLE_TELEMETRY=1 -e TCL_LIBDIR_PATH=/usr/lib/x86_64-linux-gnu/ -e TK_LIBDIR_PATH=/usr/lib/x86_64-linux-gnu/ -v $(pwd)/build:/app/build -v $(pwd)/dist:/app/dist -v ghcr.io/capsize-games/airunner/airunner:linux bash build.sh

Windows

docker run -it -e DEV_ENV=0 -e AIRUNNER_ENVIRONMENT=prod -e AIRUNNER_OS=windows -e PYTORCH_CUDA_ALLOC_CONF=garbage_collection_threshold:0.9,max_split_size_mb:512 -e NUMBA_CACHE_DIR=/tmp/numba_cache -e DISABLE_TELEMETRY=1 -v ./build:/app/build -v ./dist:/app/dist ghcr.io/capsize-games/airunner/airunner:windows wine64 build.windows.cmd

Run the build

./dist/airunner/airunner
Clone this wiki locally