diff --git a/dockerfile b/dockerfile index 05f14fa..517ba02 100644 --- a/dockerfile +++ b/dockerfile @@ -2,6 +2,7 @@ FROM python:3.12 RUN python -m pip install --upgrade pip RUN mkdir /home/dolores COPY . /home/dolores +WORKDIR /home/dolores RUN python -m venv /home/dolores/.venv RUN . /home/dolores/.venv/bin/activate RUN pip install -r /home/dolores/requirements.txt diff --git a/requirements.txt b/requirements.txt index ee6a052..18394d1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,4 @@ requests==2.32.3 -pyyaml==6.0.2 -yt-dlp==2024.8.6 py-cord[voice]==2.6.0 openai==1.41.0 apprise==1.8.1 diff --git a/src/dolores.py b/src/dolores.py index 927031c..802cbef 100644 --- a/src/dolores.py +++ b/src/dolores.py @@ -37,7 +37,8 @@ if os.environ["GENERATION_ENABLED"].lower() == "true": bot.add_cog(generation(bot)) -with open(os.path.join("..", "locales", "strings.json"), "r") as f: +strings_path = "/home/dolores/locales/strings.json" +with open(strings_path, "r") as f: summary_exclude_strings = json.load(f).get("SUMMARY_EXCLUDED_STRINGS", []) diff --git a/src/modules/generation.py b/src/modules/generation.py index 28a1d6b..67c29f4 100644 --- a/src/modules/generation.py +++ b/src/modules/generation.py @@ -23,7 +23,8 @@ message_history = deque(maxlen=10) -with open(os.path.join("..", "locales", "strings.json"), "r") as f: +strings_path = "/home/dolores/locales/strings.json" +with open(strings_path, "r") as f: json_data = json.load(f) system_messages = json_data.get("LLM_SYSTEM_MESSAGES", []) snarky_comments = json_data.get("SNARKY_COMMENTS", []) diff --git a/src/modules/rolling.py b/src/modules/rolling.py index 7a7d512..027e4c3 100644 --- a/src/modules/rolling.py +++ b/src/modules/rolling.py @@ -9,7 +9,8 @@ from discord.ext import commands -with open(os.path.join("..", "locales", "strings.json"), "r") as f: +strings_path = "/home/dolores/locales/strings.json" +with open(strings_path, "r") as f: sarcastic_names = json.load(f).get("SARCASTIC_NAMES", []) diff --git a/src/modules/scheduling.py b/src/modules/scheduling.py index f0ac637..48ccfbb 100644 --- a/src/modules/scheduling.py +++ b/src/modules/scheduling.py @@ -25,7 +25,8 @@ twitch_headers = {"Authorization": "", "Client-ID": os.environ["TWITCH_CLIENT_ID"]} -with open(os.path.join("..", "locales", "strings.json"), "r") as f: +strings_path = "/home/dolores/locales/strings.json" +with open(strings_path, "r") as f: sarcastic_names = json.load(f).get("SARCASTIC_NAMES", [])