diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 38 |
1 files changed, 38 insertions, 0 deletions
@@ -8,6 +8,7 @@ _Image artificially created by Midjourney through a prompt generated by a Nano B https://user-images.githubusercontent.com/113217272/237840989-1e29a5cc-6644-48d0-87b4-62798dc6ebd3.mp4 - [Setup](#setup) + - [Docker](#docker) - [Usage](#usage) - [Command Line](#command-line) - [Library](#library) @@ -46,6 +47,43 @@ export NANO_BOTS_CARTRIDGES_DIRECTORY=/home/user/.local/share/nano-bots/cartridg Alternatively, if your current directory has a `.env` file with the environment variables, they will be automatically loaded. +## Docker + +Clone the repository and copy the Docker Compose template: + +``` +git clone git@github.com:icebaker/ruby-nano-bots.git +cd ruby-nano-bots +cp docker-compose.example.yml docker-compose.yml +``` + +Set your provider credentials and choose your desired directory for the cartridges files: + +```yaml +version: '3.7' + +services: + nano-bots: + image: ruby:3.2.2-slim-bullseye + command: sh -c "gem install nano-bots -v 0.0.1 && bash" + environment: + OPENAI_API_ADDRESS: https://api.openai.com + OPENAI_API_ACCESS_TOKEN: your-token + OPENAI_API_USER_IDENTIFIER: your-user + volumes: + - ./your-cartridges:/cartridges +``` + +Enter the container: +```sh +docker compose run nano-bots +``` + +Start playing: +```sh +rnb cartridges/assistant.yml - repl +``` + ## Usage ### Command Line |