mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-10 07:46:59 +00:00
build server into desktop app
This commit is contained in:
5
server/.gitignore
vendored
Normal file
5
server/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
.env
|
||||
.venv
|
||||
*.spec
|
||||
build
|
||||
dist
|
||||
@@ -1,6 +1,5 @@
|
||||
import site
|
||||
import os
|
||||
import shutil
|
||||
from PyInstaller.__main__ import run as pyi_run
|
||||
|
||||
# the llama_cpp directory is not included if not explicitly added
|
||||
@@ -13,10 +12,9 @@ args = [
|
||||
site_packages_dir,
|
||||
"--add-data",
|
||||
f"{llama_cpp_dir}{os.pathsep}llama_cpp",
|
||||
"--onefile",
|
||||
"--onefile"
|
||||
]
|
||||
|
||||
# generate the .spec file and run PyInstaller
|
||||
pyi_run(args)
|
||||
|
||||
shutil.copy2("dist/server", "../client/resources/server")
|
||||
|
||||
@@ -76,4 +76,4 @@ def generate():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(debug=True, threaded=True, port=5000)
|
||||
app.run(debug=True, threaded=True, port=5001)
|
||||
|
||||
Reference in New Issue
Block a user