-
-
Notifications
You must be signed in to change notification settings - Fork 21
Installation instructions
Download the official build from itch.io or by using the itch.io app which will allow you to easily update AI Runner, keep up with the devlogs and more.
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
Follow these steps to install AI Runner from source or pypi
On Windows
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
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 torch torchvision torchaudio bitsandbytes triton
# txt2vid support on linux:
sudo apt-get install ubuntu-restricted-extras
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
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
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
Windows
docker-compose -f docker-compose.windows.yml run windows_prod xvfb-run -e /dev/stdout wine64 C:/Python310/python.ex^CZ:/app/airunner/src/airunner/main.py
Linux
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