From 94796938851836a5fb826a00e821bb9221032c05 Mon Sep 17 00:00:00 2001 From: Edward Yang Date: Thu, 22 Aug 2024 10:57:05 +1000 Subject: [PATCH 1/4] bump apptainer v --- ollama-submit.sh | 2 +- run-chatbot.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ollama-submit.sh b/ollama-submit.sh index dc972a7..45c5511 100755 --- a/ollama-submit.sh +++ b/ollama-submit.sh @@ -7,7 +7,7 @@ set -eu module purge -module load apptainer/1.2.3 +module load apptainer/1.2.5 ollama_models=/vast/scratch/users/$USER/ollama-models ollama_tmp=/vast/scratch/users/$USER/tmp diff --git a/run-chatbot.sh b/run-chatbot.sh index 2d76410..ed4f9f7 100755 --- a/run-chatbot.sh +++ b/run-chatbot.sh @@ -6,7 +6,7 @@ set -eu ollama_host=$1 module purge -module load apptainer/1.2.3 +module load apptainer/1.2.5 ollama_models=/vast/scratch/users/$USER/ollama-models ollama_tmp=/vast/scratch/users/$USER/tmp From d914043b200ed0719f38ac0fea62ab6cdc58f0a9 Mon Sep 17 00:00:00 2001 From: Edward Yang Date: Thu, 22 Aug 2024 11:04:19 +1000 Subject: [PATCH 2/4] supply port on run-chatbot.sh --- README.md | 7 +++++++ run-chatbot.sh | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 19d936c..465fa3f 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,13 @@ Password: 123 NOTE: the models' dropdowns are pre-populated, but you need to pull them first to use them. Future work will automatically pull the models. +To run the chatbot on a different port, supply the port as the second arg: + +```bash +# port could be 12345 +./run-chatbot.sh +``` + 4. Add data to database Fill out: diff --git a/run-chatbot.sh b/run-chatbot.sh index ed4f9f7..d971e52 100755 --- a/run-chatbot.sh +++ b/run-chatbot.sh @@ -5,6 +5,14 @@ set -eu ollama_host=$1 +# set port that chatbot is listening to +if [ -z "${2}" ] +then + chatbot_port_flag="" +else + chatbot_port_flag="--port $2" +fi + module purge module load apptainer/1.2.5 @@ -14,4 +22,4 @@ ollama_tmp=/vast/scratch/users/$USER/tmp apptainer run \ -B $TMPDIR:/tmp \ -B /vast,/stornext \ - oras://ghcr.io/wehi-researchcomputing/rag:0.1.0 --ollama-host $ollama_host + oras://ghcr.io/wehi-researchcomputing/rag:0.1.0 --ollama-host $ollama_host $chatbot_port_flag From 43bb17ca0f028e80c745497bccc8fc4df6726833 Mon Sep 17 00:00:00 2001 From: Edward Yang Date: Thu, 22 Aug 2024 11:04:55 +1000 Subject: [PATCH 3/4] remove TMPDIR binding --- run-chatbot.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/run-chatbot.sh b/run-chatbot.sh index d971e52..680f06c 100755 --- a/run-chatbot.sh +++ b/run-chatbot.sh @@ -20,6 +20,5 @@ ollama_models=/vast/scratch/users/$USER/ollama-models ollama_tmp=/vast/scratch/users/$USER/tmp apptainer run \ - -B $TMPDIR:/tmp \ -B /vast,/stornext \ oras://ghcr.io/wehi-researchcomputing/rag:0.1.0 --ollama-host $ollama_host $chatbot_port_flag From 0261201e116b02399a0def9ae757c16068951d60 Mon Sep 17 00:00:00 2001 From: Edward Yang Date: Thu, 22 Aug 2024 11:46:19 +1000 Subject: [PATCH 4/4] mount tmp on vast as /tmp --- run-chatbot.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/run-chatbot.sh b/run-chatbot.sh index 680f06c..15746c5 100755 --- a/run-chatbot.sh +++ b/run-chatbot.sh @@ -19,6 +19,10 @@ module load apptainer/1.2.5 ollama_models=/vast/scratch/users/$USER/ollama-models ollama_tmp=/vast/scratch/users/$USER/tmp +export TMPDIR=/vast/scratch/users/$USER/tmp +mkdir -p $TMPDIR + apptainer run \ + -B $TMPDIR:/tmp \ -B /vast,/stornext \ oras://ghcr.io/wehi-researchcomputing/rag:0.1.0 --ollama-host $ollama_host $chatbot_port_flag