Added readme and docker files, because, idk, I hate life ig

This commit is contained in:
Emile 2021-06-25 20:48:49 +01:00
parent d467fd261a
commit a64d52cc12
4 changed files with 46 additions and 1 deletions

5
.gitignore vendored
View File

@ -1,2 +1,5 @@
/target
.vscode
.vscode
gpt/
bot_config.json
fediverse.toml

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM rust:latest
RUN mkdir -p /rust/izzilis/src
WORKDIR /rust/izzilis
COPY src/* ./src/
COPY bot_config.json .
COPY fediverse.toml .
COPY Cargo.* ./
RUN cargo build --release && \
cp target/release/izzilis /usr/bin/
CMD ["izzilis"]

18
README.md Normal file
View File

@ -0,0 +1,18 @@
# izzilis gpt-2 bot
Meant to be used with a finetuned GPT-2 model
## Usage
just run it, it'll make a `bot_config.json` file in the running path
fill it out
run again
## Docker Usage
The dockerfile makes a few assumptions which you must fulfill:
* the gpt python files & model are in the gpt/ directory (this directory doesn't exist, please make it (it must contain both `generate_unconditional_samples.py` and the `models` directory containing your finetuned model))
* you have ran the bot already. Once to generate a `bot_config.json` and a second time, once the aforementioned file is generated and filled out by the user, `fediverse.toml` from authenticating with the instance.

11
docker-compose.yml Normal file
View File

@ -0,0 +1,11 @@
version: '3'
# Why? Fuck if I know
services:
izzilis:
build: .
container_name: izzlis_bot
restart: always
volumes:
- ./gpt:/rust/izzilis/gpt