Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
03eca6ea
Commit
03eca6ea
authored
Jul 06, 2023
by
Jeffrey Morgan
Browse files
fix path to `ollama`
parent
4f3cfea6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
app/src/index.ts
app/src/index.ts
+3
-4
No files found.
app/src/index.ts
View file @
03eca6ea
...
@@ -37,10 +37,10 @@ const createWindow = (): void => {
...
@@ -37,10 +37,10 @@ const createWindow = (): void => {
mainWindow
.
loadURL
(
MAIN_WINDOW_WEBPACK_ENTRY
)
mainWindow
.
loadURL
(
MAIN_WINDOW_WEBPACK_ENTRY
)
}
}
const
ollama
=
path
.
join
(
process
.
resourcesPath
,
'
ollama
'
)
// if the app is packaged then run the server
// if the app is packaged then run the server
if
(
app
.
isPackaged
)
{
if
(
app
.
isPackaged
)
{
const
ollama
=
path
.
join
(
process
.
resourcesPath
,
'
ollama
'
)
// Start the executable
// Start the executable
console
.
log
(
`Starting server`
)
console
.
log
(
`Starting server`
)
const
proc
=
spawn
(
ollama
,
[
'
serve
'
])
const
proc
=
spawn
(
ollama
,
[
'
serve
'
])
...
@@ -66,9 +66,8 @@ function installCLI() {
...
@@ -66,9 +66,8 @@ function installCLI() {
})
})
.
then
(
result
=>
{
.
then
(
result
=>
{
if
(
result
.
response
===
0
)
{
if
(
result
.
response
===
0
)
{
let
resourcePath
=
path
.
join
(
process
.
resourcesPath
,
'
your_binary
'
)
let
command
=
`
let
command
=
`
do shell script "ln -F -s
${
resourcePath
}
/usr/local/bin/ollama" with administrator privileges
do shell script "ln -F -s
${
ollama
}
/usr/local/bin/ollama" with administrator privileges
`
`
exec
(
`osascript -e '
${
command
}
'`
,
(
error
:
Error
|
null
,
stdout
:
string
,
stderr
:
string
)
=>
{
exec
(
`osascript -e '
${
command
}
'`
,
(
error
:
Error
|
null
,
stdout
:
string
,
stderr
:
string
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment