From f4816e23a4de79154360cc7fb155c545edf64241 Mon Sep 17 00:00:00 2001 From: lfglance Date: Wed, 15 Jan 2025 22:47:16 -0800 Subject: [PATCH 1/6] ignore ephemeral files that might exist from transcribing --- .dockerignore | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..7c48a77 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +*.txt +*.json +*.log +*.md +*.sh \ No newline at end of file From 68642b53b327a4ee8f3baca600b4bf9e9cddc58d Mon Sep 17 00:00:00 2001 From: lfglance Date: Wed, 15 Jan 2025 22:47:54 -0800 Subject: [PATCH 2/6] add an empty model folder to house whisper model --- .gitignore | 3 ++- model/.gitignore | 0 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 model/.gitignore diff --git a/.gitignore b/.gitignore index aae9bdf..19c69f2 100644 --- a/.gitignore +++ b/.gitignore @@ -196,4 +196,5 @@ pyrightconfig.json .history .ionide -# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,python \ No newline at end of file +# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,python +model/base.pt \ No newline at end of file diff --git a/model/.gitignore b/model/.gitignore new file mode 100644 index 0000000..e69de29 From 04fcc2edbac32a1afdc853c6120ebe671678ab59 Mon Sep 17 00:00:00 2001 From: lfglance Date: Wed, 15 Jan 2025 22:48:43 -0800 Subject: [PATCH 3/6] include model dir in dockerignore --- .dockerignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 7c48a77..2e33c32 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,4 +2,5 @@ *.json *.log *.md -*.sh \ No newline at end of file +*.sh +model \ No newline at end of file From 9931f8db4ccde8891d3242ad487c85d9399ecac9 Mon Sep 17 00:00:00 2001 From: lfglance Date: Wed, 15 Jan 2025 22:51:36 -0800 Subject: [PATCH 4/6] show new volume mount in readme --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f50fdba..8a9de0d 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,8 @@ You can run the Docker container with the following command, mapping the necessa ```bash docker run -it --rm \ - -v /path/to/your/local/files:/app \ + -v ./:/app \ + -v ./model:/root/.cache/whisper \ -e INPUT_FILE="file.mp4" \ -e PROMPT_FILE="meeting.md" \ -e CONFIG_FILE="config.yml" \ @@ -56,7 +57,8 @@ docker run -it --rm \ ``` This command: -- Mounts the directory containing your files to the `/app` directory inside the Docker container. +- Mounts the root of the repo to the `/app` directory inside the Docker container. +- Mounts the `model` directory to the download location of the whisper model to avoid repeat downloads - Sets environment variables for the input file, prompt file, and config file. ### Output Files From f7fa43d466a4a67ab3b8fd3f177cdc7299d3c838 Mon Sep 17 00:00:00 2001 From: lfglance Date: Wed, 15 Jan 2025 22:54:36 -0800 Subject: [PATCH 5/6] add note about host networking --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8a9de0d..94ff9c7 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,8 @@ This command: - Mounts the `model` directory to the download location of the whisper model to avoid repeat downloads - Sets environment variables for the input file, prompt file, and config file. +If your Ollama installation is on the same host, you will want to include `--network host` to the command in order to run the container with the ability to interact with the host's loopback address. + ### Output Files The script will generate the following output files based on the input filename: From 4aa5956e711ba8c7580eab7f2ec307b3cd628fa3 Mon Sep 17 00:00:00 2001 From: lfglance Date: Wed, 15 Jan 2025 22:54:43 -0800 Subject: [PATCH 6/6] add volume mount in run.sh --- run.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 0383085..a3ffde7 100755 --- a/run.sh +++ b/run.sh @@ -1,5 +1,5 @@ #!/bin/bash - + docker build -t echomind . # Check if correct number of arguments are provided @@ -16,6 +16,7 @@ CONFIG_FILE=$3 # Run the Docker command with the provided arguments docker run -it --rm \ -v "$(pwd):/app" \ + -v "$(pwd)/model:/root/.cache/whisper" \ -e INPUT_FILE="$INPUT_FILE" \ -e PROMPT_FILE="$PROMPT_FILE" \ -e CONFIG_FILE="$CONFIG_FILE" \