mirror of
https://github.com/exo-explore/exo.git
synced 2025-12-23 14:17:58 -05:00
8000 -> 52415 (#915)
* 8000 -> 52415 * dont grab the api port for placement --------- Co-authored-by: rltakashige <rl.takashige@gmail.com>
This commit is contained in:
@@ -40,7 +40,7 @@ You can download the latest build here: [EXO-latest.dmg](https://assets.exolabs.
|
|||||||
|
|
||||||
To run from source, clone the repo, build the dashboard with `cd dashboard && npm install && npm run build` and run `uv run exo`.
|
To run from source, clone the repo, build the dashboard with `cd dashboard && npm install && npm run build` and run `uv run exo`.
|
||||||
|
|
||||||
After starting with either of these methods go to `http://localhost:8000` in your browser, and you'll have EXO.
|
After starting with either of these methods go to `http://localhost:52415` in your browser, and you'll have EXO.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ export default defineConfig({
|
|||||||
plugins: [tailwindcss(), sveltekit()],
|
plugins: [tailwindcss(), sveltekit()],
|
||||||
server: {
|
server: {
|
||||||
proxy: {
|
proxy: {
|
||||||
'/v1': 'http://localhost:8000',
|
'/v1': 'http://localhost:52415',
|
||||||
'/state': 'http://localhost:8000',
|
'/state': 'http://localhost:52415',
|
||||||
'/models': 'http://localhost:8000',
|
'/models': 'http://localhost:52415',
|
||||||
'/instance': 'http://localhost:8000'
|
'/instance': 'http://localhost:52415'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -205,7 +205,8 @@ class Args(CamelCaseModel):
|
|||||||
verbosity: int = 0
|
verbosity: int = 0
|
||||||
force_master: bool = False
|
force_master: bool = False
|
||||||
spawn_api: bool = False
|
spawn_api: bool = False
|
||||||
api_port: PositiveInt = 8000
|
api_port: PositiveInt = 52415
|
||||||
|
tb_only: bool = False
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def parse(cls) -> Self:
|
def parse(cls) -> Self:
|
||||||
@@ -241,7 +242,7 @@ class Args(CamelCaseModel):
|
|||||||
"--api-port",
|
"--api-port",
|
||||||
type=int,
|
type=int,
|
||||||
dest="api_port",
|
dest="api_port",
|
||||||
default=8000,
|
default=52415,
|
||||||
)
|
)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class API:
|
|||||||
node_id: NodeId,
|
node_id: NodeId,
|
||||||
session_id: SessionId,
|
session_id: SessionId,
|
||||||
*,
|
*,
|
||||||
port: int = 8000,
|
port: int,
|
||||||
# Ideally this would be a MasterForwarderEvent but type system says no :(
|
# Ideally this would be a MasterForwarderEvent but type system says no :(
|
||||||
global_event_receiver: Receiver[ForwarderEvent],
|
global_event_receiver: Receiver[ForwarderEvent],
|
||||||
command_sender: Sender[ForwarderCommand],
|
command_sender: Sender[ForwarderCommand],
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ from exo.shared.types.worker.instances import (
|
|||||||
|
|
||||||
|
|
||||||
def random_ephemeral_port() -> int:
|
def random_ephemeral_port() -> int:
|
||||||
return random.randint(49152, 65535)
|
port = random.randint(49153, 65535)
|
||||||
|
return port - 1 if port <= 52415 else 52414
|
||||||
|
|
||||||
|
|
||||||
def add_instance_to_placements(
|
def add_instance_to_placements(
|
||||||
|
|||||||
@@ -421,10 +421,10 @@ class Worker:
|
|||||||
local_node_id=self.node_id,
|
local_node_id=self.node_id,
|
||||||
send_back_node_id=nid,
|
send_back_node_id=nid,
|
||||||
# nonsense multiaddr
|
# nonsense multiaddr
|
||||||
send_back_multiaddr=Multiaddr(address=f"/ip4/{ip}/tcp/8000")
|
send_back_multiaddr=Multiaddr(address=f"/ip4/{ip}/tcp/52415")
|
||||||
if "." in ip
|
if "." in ip
|
||||||
# nonsense multiaddr
|
# nonsense multiaddr
|
||||||
else Multiaddr(address=f"/ip6/{ip}/tcp/8000"),
|
else Multiaddr(address=f"/ip6/{ip}/tcp/52415"),
|
||||||
)
|
)
|
||||||
if edge not in edges:
|
if edge not in edges:
|
||||||
logger.debug(f"ping discovered {edge=}")
|
logger.debug(f"ping discovered {edge=}")
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ async def check_reachability(
|
|||||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
sock.settimeout(1) # 1 second timeout
|
sock.settimeout(1) # 1 second timeout
|
||||||
try:
|
try:
|
||||||
result = await to_thread.run_sync(sock.connect_ex, (target_ip, 8000))
|
result = await to_thread.run_sync(sock.connect_ex, (target_ip, 52415))
|
||||||
except socket.gaierror:
|
except socket.gaierror:
|
||||||
# seems to throw on ipv6 loopback. oh well
|
# seems to throw on ipv6 loopback. oh well
|
||||||
# logger.warning(f"invalid {target_ip=}")
|
# logger.warning(f"invalid {target_ip=}")
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import requests
|
|||||||
|
|
||||||
|
|
||||||
def stream_chat(host: str, query: str) -> None:
|
def stream_chat(host: str, query: str) -> None:
|
||||||
url = f"http://{host}:8000/v1/chat/completions"
|
url = f"http://{host}:52415/v1/chat/completions"
|
||||||
headers = {"Content-Type": "application/json"}
|
headers = {"Content-Type": "application/json"}
|
||||||
payload = {
|
payload = {
|
||||||
"model": "mlx-community/Llama-3.2-1B-Instruct-4bit",
|
"model": "mlx-community/Llama-3.2-1B-Instruct-4bit",
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ HOST="$1"
|
|||||||
shift
|
shift
|
||||||
QUERY="$*"
|
QUERY="$*"
|
||||||
|
|
||||||
curl -sN -X POST "http://$HOST:8000/v1/chat/completions" \
|
curl -sN -X POST "http://$HOST:52415/v1/chat/completions" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{
|
-d "{
|
||||||
\"model\": \"mlx-community/Kimi-K2-Thinking\",
|
\"model\": \"mlx-community/Kimi-K2-Thinking\",
|
||||||
|
|||||||
Reference in New Issue
Block a user