From c38242e6ae889810acd82bfd45463298a7dd41e7 Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Tue, 8 Oct 2024 09:08:05 +0200 Subject: [PATCH 1/3] scripts --- deployment_scripts/linux/NOTE.txt | 3 +++ deployment_scripts/windows/NOTE.txt | 5 +++++ deployment_scripts/windows/prepare.bat | 3 +++ deployment_scripts/windows/run.bat | 3 +++ deployment_scripts/windows/scripts/prepare_npm.bat | 6 ++++++ .../windows/scripts/prepare_ollama.bat | 13 +++++++++++++ deployment_scripts/windows/scripts/prepare_py.bat | 9 +++++++++ deployment_scripts/windows/scripts/run_electron.bat | 6 ++++++ deployment_scripts/windows/scripts/run_ollama.bat | 2 ++ deployment_scripts/windows/scripts/run_py.bat | 9 +++++++++ 10 files changed, 59 insertions(+) create mode 100644 deployment_scripts/linux/NOTE.txt create mode 100644 deployment_scripts/windows/NOTE.txt create mode 100644 deployment_scripts/windows/prepare.bat create mode 100644 deployment_scripts/windows/run.bat create mode 100644 deployment_scripts/windows/scripts/prepare_npm.bat create mode 100644 deployment_scripts/windows/scripts/prepare_ollama.bat create mode 100644 deployment_scripts/windows/scripts/prepare_py.bat create mode 100644 deployment_scripts/windows/scripts/run_electron.bat create mode 100644 deployment_scripts/windows/scripts/run_ollama.bat create mode 100644 deployment_scripts/windows/scripts/run_py.bat diff --git a/deployment_scripts/linux/NOTE.txt b/deployment_scripts/linux/NOTE.txt new file mode 100644 index 0000000..537fc36 --- /dev/null +++ b/deployment_scripts/linux/NOTE.txt @@ -0,0 +1,3 @@ +on linux it is slightly easier + +i'd say to create a preparation script for dnf/yum and apt based systems, which basically downloads the dependencies via the package manager, and ollama via the usual script diff --git a/deployment_scripts/windows/NOTE.txt b/deployment_scripts/windows/NOTE.txt new file mode 100644 index 0000000..330097c --- /dev/null +++ b/deployment_scripts/windows/NOTE.txt @@ -0,0 +1,5 @@ +You will need to make three folders: + +node - contains nodejs portable +py - contains python3 portable +ollama - contains ollama portable diff --git a/deployment_scripts/windows/prepare.bat b/deployment_scripts/windows/prepare.bat new file mode 100644 index 0000000..163e99d --- /dev/null +++ b/deployment_scripts/windows/prepare.bat @@ -0,0 +1,3 @@ +start /b scripts\prepare_py.bat +start /b scripts\prepare_npm.bat +start /b scripts\prepare_ollama.bat \ No newline at end of file diff --git a/deployment_scripts/windows/run.bat b/deployment_scripts/windows/run.bat new file mode 100644 index 0000000..93e1277 --- /dev/null +++ b/deployment_scripts/windows/run.bat @@ -0,0 +1,3 @@ +start /b scripts\run_ollama.bat +start /b scripts\run_electron.bat +start /b scripts\run_py.bat \ No newline at end of file diff --git a/deployment_scripts/windows/scripts/prepare_npm.bat b/deployment_scripts/windows/scripts/prepare_npm.bat new file mode 100644 index 0000000..13f4f57 --- /dev/null +++ b/deployment_scripts/windows/scripts/prepare_npm.bat @@ -0,0 +1,6 @@ +cd node-bin +set PATH=%PATH%;%CD% +cd .. + +npm install +npm run build diff --git a/deployment_scripts/windows/scripts/prepare_ollama.bat b/deployment_scripts/windows/scripts/prepare_ollama.bat new file mode 100644 index 0000000..fc2de61 --- /dev/null +++ b/deployment_scripts/windows/scripts/prepare_ollama.bat @@ -0,0 +1,13 @@ +cd ollama-bin +ollama.exe pull phi3.5 +ollama.exe pull qwen2-math:1.5b +ollama.exe pull starcoder2 +ollama.exe pull llava-phi3 +ollama.exe pull qwen2.5-coder:1.5b +ollama.exe pull starcoder2:7b +ollama.exe pull wizard-math +ollama.exe pull llama3.1 +ollama.exe pull llava +ollama.exe pull qwen2.5 +ollama.exe pull mathstral +ollama.exe pull qwen2.5-coder \ No newline at end of file diff --git a/deployment_scripts/windows/scripts/prepare_py.bat b/deployment_scripts/windows/scripts/prepare_py.bat new file mode 100644 index 0000000..8337c91 --- /dev/null +++ b/deployment_scripts/windows/scripts/prepare_py.bat @@ -0,0 +1,9 @@ +cd python-bin +set PATH=%PATH%;%CD% +cd Scripts +set PATH=%PATH%;%CD% +cd .. +cd .. + +cd py +python -m pip install -r requirements.txt \ No newline at end of file diff --git a/deployment_scripts/windows/scripts/run_electron.bat b/deployment_scripts/windows/scripts/run_electron.bat new file mode 100644 index 0000000..4b7d254 --- /dev/null +++ b/deployment_scripts/windows/scripts/run_electron.bat @@ -0,0 +1,6 @@ +cd node-bin +set PATH=%PATH%;%CD% +cd .. + +start /b npm start +npx electron . diff --git a/deployment_scripts/windows/scripts/run_ollama.bat b/deployment_scripts/windows/scripts/run_ollama.bat new file mode 100644 index 0000000..018e09e --- /dev/null +++ b/deployment_scripts/windows/scripts/run_ollama.bat @@ -0,0 +1,2 @@ +cd ollama-bin +"ollama app.exe" \ No newline at end of file diff --git a/deployment_scripts/windows/scripts/run_py.bat b/deployment_scripts/windows/scripts/run_py.bat new file mode 100644 index 0000000..d4c9e98 --- /dev/null +++ b/deployment_scripts/windows/scripts/run_py.bat @@ -0,0 +1,9 @@ +cd python-bin +set PATH=%PATH%;%CD% +cd Scripts +set PATH=%PATH%;%CD% +cd .. +cd .. + +cd py +python api.py \ No newline at end of file From 030e6a3dafd23329012e8e839dcab05e6e9597e0 Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Tue, 8 Oct 2024 09:57:04 +0200 Subject: [PATCH 2/3] ollama tweaks --- deployment_scripts/windows/scripts/prepare_ollama.bat | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deployment_scripts/windows/scripts/prepare_ollama.bat b/deployment_scripts/windows/scripts/prepare_ollama.bat index fc2de61..ce6187d 100644 --- a/deployment_scripts/windows/scripts/prepare_ollama.bat +++ b/deployment_scripts/windows/scripts/prepare_ollama.bat @@ -7,6 +7,9 @@ ollama.exe pull qwen2.5-coder:1.5b ollama.exe pull starcoder2:7b ollama.exe pull wizard-math ollama.exe pull llama3.1 +ollama.exe pull llama3.2 +ollama.exe pull dolphin-phi +ollama.exe pull dolphin-llama3 ollama.exe pull llava ollama.exe pull qwen2.5 ollama.exe pull mathstral From 0b2bbaccad09f46269e4714248c67bbe00883ca5 Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Tue, 8 Oct 2024 10:14:12 +0200 Subject: [PATCH 3/3] pip changes --- deployment_scripts/windows/scripts/prepare_py.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deployment_scripts/windows/scripts/prepare_py.bat b/deployment_scripts/windows/scripts/prepare_py.bat index 8337c91..dc9c8eb 100644 --- a/deployment_scripts/windows/scripts/prepare_py.bat +++ b/deployment_scripts/windows/scripts/prepare_py.bat @@ -1,5 +1,7 @@ cd python-bin set PATH=%PATH%;%CD% +curl -O https://bootstrap.pypa.io/get-pip.py +python get-pip.py cd Scripts set PATH=%PATH%;%CD% cd ..