diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..2e33c32 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +*.txt +*.json +*.log +*.md +*.sh +model \ No newline at end of file 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/README.md b/README.md index f50fdba..94ff9c7 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,9 +57,12 @@ 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. +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: diff --git a/model/.gitignore b/model/.gitignore new file mode 100644 index 0000000..e69de29 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" \