mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 05:24:02 +00:00
Merge pull request #5660 from open-webui/pypi-release
fix: open-webui serve
This commit is contained in:
commit
c7e93b32c5
@ -52,9 +52,10 @@ def serve(
|
|||||||
)
|
)
|
||||||
os.environ["USE_CUDA_DOCKER"] = "false"
|
os.environ["USE_CUDA_DOCKER"] = "false"
|
||||||
os.environ["LD_LIBRARY_PATH"] = ":".join(LD_LIBRARY_PATH)
|
os.environ["LD_LIBRARY_PATH"] = ":".join(LD_LIBRARY_PATH)
|
||||||
|
|
||||||
import open_webui.main # we need set environment variables before importing main
|
import open_webui.main # we need set environment variables before importing main
|
||||||
|
|
||||||
uvicorn.run("open_webui.main:app", host=host, port=port, forwarded_allow_ips="*")
|
uvicorn.run(open_webui.main.app, host=host, port=port, forwarded_allow_ips="*")
|
||||||
|
|
||||||
|
|
||||||
@app.command()
|
@app.command()
|
||||||
|
@ -90,10 +90,14 @@ async def periodic_usage_pool_cleanup():
|
|||||||
await asyncio.sleep(TIMEOUT_DURATION)
|
await asyncio.sleep(TIMEOUT_DURATION)
|
||||||
|
|
||||||
|
|
||||||
|
async def on_startup():
|
||||||
|
asyncio.create_task(periodic_usage_pool_cleanup())
|
||||||
|
|
||||||
|
|
||||||
app = socketio.ASGIApp(
|
app = socketio.ASGIApp(
|
||||||
sio,
|
sio,
|
||||||
socketio_path="/ws/socket.io",
|
socketio_path="/ws/socket.io",
|
||||||
on_startup=asyncio.create_task(periodic_usage_pool_cleanup()),
|
on_startup=on_startup(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "open-webui",
|
"name": "open-webui",
|
||||||
"version": "0.3.27.dev1",
|
"version": "0.3.27.dev2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "open-webui",
|
"name": "open-webui",
|
||||||
"version": "0.3.27.dev1",
|
"version": "0.3.27.dev2",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/lang-javascript": "^6.2.2",
|
"@codemirror/lang-javascript": "^6.2.2",
|
||||||
"@codemirror/lang-python": "^6.1.6",
|
"@codemirror/lang-python": "^6.1.6",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "open-webui",
|
"name": "open-webui",
|
||||||
"version": "0.3.27.dev1",
|
"version": "0.3.27.dev2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "npm run pyodide:fetch && vite dev --host",
|
"dev": "npm run pyodide:fetch && vite dev --host",
|
||||||
|
Loading…
Reference in New Issue
Block a user