diff --git a/.dockerignore b/.dockerignore index d5e58ed..b1304bf 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,3 +2,4 @@ __pycache__ /venv /.env .git +/cache diff --git a/.gitignore b/.gitignore index d5e58ed..b1304bf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ __pycache__ /venv /.env .git +/cache diff --git a/Dockerfile b/Dockerfile index 0716aff..95552e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM python:3.11-slim-buster RUN apt-get update -y # Install LibreOffice, Firefox ESR and pip -RUN apt-get install -y libreoffice firefox-esr +RUN apt-get install -y libreoffice firefox-esr ffmpeg # Set the working directory in the container to /app WORKDIR /app diff --git a/bot_db.py b/bot_db.py index 2ee2c5d..b76eb48 100644 --- a/bot_db.py +++ b/bot_db.py @@ -20,6 +20,11 @@ from langchain.embeddings import OpenAIEmbeddings from selenium import webdriver +if not os.path.exists("./cache"): + os.mkdir("./cache") +if not os.path.exists("./cache/yt-dlp"): + os.mkdir("./cache/yt-dlp") + print("lanuching driver") options = webdriver.FirefoxOptions() options.add_argument("-headless") diff --git a/docker-compose.yaml b/docker-compose.yaml index 55ca815..d7def72 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,25 +1,25 @@ version: '3' services: bot-chatgpt: - image: matrix-chain + image: heimoshuiyu/matrix-chain:latest env_file: - ./.env command: python3 bot_chatgpt.py bot-db: - image: matrix-chain + image: heimoshuiyu/matrix-chain:latest env_file: - ./.env command: python3 bot_db.py bot-whisper: - image: matrix-chain + image: heimoshuiyu/matrix-chain:latest env_file: - ./.env command: python3 bot_whisper.py bot-tts: - image: matrix-chain + image: heimoshuiyu/matrix-chain:latest env_file: - ./.env - command: python3 bot_tts.py \ No newline at end of file + command: python3 bot_tts.py