diff --git a/.gitignore b/.gitignore index ccb5166..7eb6f32 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ /target -.vscode \ No newline at end of file +.vscode +gpt/ +bot_config.json +fediverse.toml \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c5e6a51 --- /dev/null +++ b/Dockerfile @@ -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"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..ac6442f --- /dev/null +++ b/README.md @@ -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. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..995df59 --- /dev/null +++ b/docker-compose.yml @@ -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 \ No newline at end of file