From 879e996ca4efe80288b8db575c5bdda9244f7a69 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Thu, 6 Jul 2023 11:21:56 -0400 Subject: [PATCH] update app to use go binary --- Makefile | 2 +- app/forge.config.ts | 2 +- app/package.json | 2 +- app/src/index.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index a4482089..29e9caa3 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ ollama: llama .PHONY: app app: ollama - npm run --prefix app package + npm run --prefix app make clean: go clean diff --git a/app/forge.config.ts b/app/forge.config.ts index f9342d2e..6f950479 100644 --- a/app/forge.config.ts +++ b/app/forge.config.ts @@ -14,7 +14,7 @@ const config: ForgeConfig = { packagerConfig: { asar: true, icon: './images/icon', - extraResource: ['../dist/ollama'], + extraResource: ['../ollama'], ...(process.env.SIGN ? { osxSign: { diff --git a/app/package.json b/app/package.json index 0d22ee94..7fbb8260 100644 --- a/app/package.json +++ b/app/package.json @@ -9,7 +9,7 @@ "package": "electron-forge package", "package:sign": "SIGN=1 electron-forge package", "make": "electron-forge make", - "make:sign": "SIGN=1 electron-forge package", + "make:sign": "SIGN=1 electron-forge make", "publish": "SIGN=1 electron-forge publish", "lint": "eslint --ext .ts,.tsx ." }, diff --git a/app/src/index.ts b/app/src/index.ts index 5351a735..98aa5cff 100644 --- a/app/src/index.ts +++ b/app/src/index.ts @@ -43,9 +43,9 @@ if (app.isPackaged) { console.log(resources) // Start the executable - const exec = path.join(resources, 'ollama', 'ollama') + const exec = path.join(resources, 'ollama') console.log(`Starting ${exec}`) - const proc = spawn(exec, ['serve', '--port', '7734']) + const proc = spawn(exec, ['serve']) proc.stdout.on('data', data => { console.log(`server: ${data}`) })