@@ -9,11 +9,10 @@ A future version may support running Stable Diffusion directly.
99
1010:zap : Note: this step is not necessary if using a Container (see below)
1111
12- Install [ poetry] ( https://python-poetry.org/ ) if you haven't already.
13- Then run the following where-ever you cloned this repo.
12+ Run the following, preferably in a virtual environment, to install droombot
1413
1514``` console
16- poetry install
15+ pip install droombot
1716```
1817
1918## How to run
@@ -23,16 +22,16 @@ poetry install
2322Configure your environment (see configuration options below), and make sure a
2423redis instance is running on your network (we recommend using a container).
2524
26- To start the bot, run the following where-ever you cloned this repo.
25+ To start the bot, run the following in the virtual environment:
2726
2827``` console
29- poetry run droombot server
28+ droombot server
3029```
3130
32- To start a worker, run the following where-ever you cloned this repo.
31+ To start a worker, run the following in the virtual environment
3332
3433``` console
35- poetry run droombot worker
34+ droombot worker
3635```
3736
3837## Components
@@ -59,50 +58,14 @@ All configuration is handled via environment variables. See the following table
5958| ` REDIS_KEY_LIFETIME ` | Number of seconds for keys to expire | No, defaults to 300 |
6059| ` MAX_REQUESTS_PER_MINUTE ` | Maximum number of requests per minute to any remote services | No, defaults to 100 |
6160
62- ## Todo:
63-
64- * Dockerfile / Podmanfile
65- * Instructions on how to use systemd to autostart
66-
6761
6862## Container
6963
70- We recommend running droombot as a container. The provided Dockerfile builds a
71- container that can run both the ` server ` and ` worker ` components.
72-
73-
74- ### Docker
75- When using docker, run the following:
76-
77- ``` console
78- docker build . -t droombot
79- docker run -p 6379:6379 -d --name droombot-redis redis:latest
80- docker run -e DISCORD_BOT_TOKEN=<token> -e DISCORD_GUILD_IDS=<ids> -d --name droombot-server droombot server
81- docker run -e STABILITY_API_KEY=<key> -e DISCORD_BOT_TOKEN=<token> -e DISCORD_GUILD_IDS=<ids> -d --name droombot-worker droombot worker
82- ```
83-
84- ### Podman
85-
86- When using podman, you can create a podman pod. After setting up the services
87- within the pod, you can then generate a set of systemd unit files. Very useful for
88- automatically starting services at boot!
89-
90- ``` console
91- podman build . -t droombot
92- podman pod create --name droombot-pod
93- podman run -d --name droombot-redis --pod droombot-pod redis:latest
94- podman run -e DISCORD_BOT_TOKEN=<token> -e DISCORD_GUILD_IDS=<ids> -d --name droombot-server --pod droombot-pod droombot server
95- podman run -e STABILITY_API_KEY=<key> -e DISCORD_BOT_TOKEN=<token> -e DISCORD_GUILD_IDS=<ids> -d --name droombot-worker --pod droombot-pod droombot worker
96- ```
97-
98- You can then run ` podman generate systemd --new --files --name droombot-pod ` to
99- generate systemd unit files. See [ this guide] ( https://www.redhat.com/sysadmin/podman-run-pods-systemd-services )
100- for how to configure systemd with the generated units.
101-
64+ Droombot can run as a container. For a howto using Docker or Podman, see the
65+ [ container docs] ( docs/containers.md ) .
10266
10367## Future plans
10468
105- 1 . Publish to PyPI
106- 2 . Expose additional options, such as multiple images and model selection.
107- 3 . Ability to run Stable Diffusion directly, with a separate worker class
108- 4 . Prompt translations, allowing users to use prompts in their own language.
69+ 1 . Expose additional options, such as multiple images and model selection.
70+ 2 . Ability to run Stable Diffusion directly, with a separate worker class
71+ 3 . Prompt translations, allowing users to use prompts in their own language.
0 commit comments