File tree Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 2
2
LocalLab - A lightweight AI inference server for running LLMs locally
3
3
"""
4
4
5
- __version__ = "0.4.39 "
5
+ __version__ = "0.4.40 "
6
6
7
7
# Only import what's necessary initially, lazy-load the rest
8
8
from .logger import get_logger
Original file line number Diff line number Diff line change @@ -98,9 +98,13 @@ async def startup_event():
98
98
if use_ngrok :
99
99
from ..utils .networking import setup_ngrok
100
100
port = int (os .environ .get ("LOCALLAB_PORT" , SERVER_PORT )) # Use SERVER_PORT as fallback
101
- ngrok_url = await setup_ngrok (port )
101
+
102
+ # Handle ngrok setup synchronously since it's not async
103
+ ngrok_url = setup_ngrok (port )
102
104
if ngrok_url :
103
105
logger .info (f"{ Fore .GREEN } Ngrok tunnel established successfully{ Style .RESET_ALL } " )
106
+ else :
107
+ logger .warning ("Failed to establish ngrok tunnel. Server will run locally only." )
104
108
105
109
# Initialize cache if available
106
110
if FASTAPI_CACHE_AVAILABLE :
Original file line number Diff line number Diff line change @@ -37,14 +37,11 @@ def setup_ngrok(port: int) -> Optional[str]:
37
37
ngrok .set_auth_token (auth_token )
38
38
conf .get_default ().auth_token = auth_token
39
39
40
- # Start tunnel with improved configuration
40
+ # Start tunnel with simplified configuration
41
41
tunnel = ngrok .connect (
42
- port ,
43
- "http" ,
44
- options = {
45
- "bind_tls" : True , # Enable HTTPS
46
- "inspect" : False , # Disable inspection for better performance
47
- }
42
+ addr = port ,
43
+ proto = "http" ,
44
+ bind_tls = True # Enable HTTPS
48
45
)
49
46
50
47
public_url = tunnel .public_url
Original file line number Diff line number Diff line change 5
5
6
6
setup (
7
7
name = "locallab" ,
8
- version = "0.4.39 " ,
8
+ version = "0.4.40 " ,
9
9
packages = find_packages (include = ["locallab" , "locallab.*" ]),
10
10
install_requires = [
11
11
"fastapi>=0.95.0,<1.0.0" ,
You can’t perform that action at this time.
0 commit comments