From f20dfb7581a4c58f6788626328f797f756bd6b80 Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Sat, 21 Oct 2023 21:32:51 +0800 Subject: [PATCH 1/4] add ffmpeg --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 8585f6424b5c89ea266aa40e0411093813d571d6 Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Sat, 21 Oct 2023 21:46:54 +0800 Subject: [PATCH 2/4] cache --- .dockerignore | 1 + .gitignore | 1 + bot_db.py | 3 +++ 3 files changed, 5 insertions(+) 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/bot_db.py b/bot_db.py index a8aa58c..6a08230 100644 --- a/bot_db.py +++ b/bot_db.py @@ -20,6 +20,9 @@ from langchain.embeddings import OpenAIEmbeddings from selenium import webdriver +if not os.path.exists("./cache"): + os.mkdir("./cache") + print("lanuching driver") options = webdriver.FirefoxOptions() options.add_argument("-headless") From 5ac2b9a4088bf5d9cd36c0c042d16c8253309c29 Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Sat, 21 Oct 2023 21:48:43 +0800 Subject: [PATCH 3/4] update image --- docker-compose.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 From f61cbeef32b3469d3bad0531dc17eddc495132c1 Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Sat, 21 Oct 2023 21:54:57 +0800 Subject: [PATCH 4/4] fix yt-dlp cache dir --- bot_db.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bot_db.py b/bot_db.py index 6a08230..3609789 100644 --- a/bot_db.py +++ b/bot_db.py @@ -22,6 +22,8 @@ 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()