mirror of
https://github.com/exo-explore/exo.git
synced 2025-10-23 02:57:14 +03:00
Merge pull request #210 from GaetanLepage/fix-main-install
Improve setup.py for proper installation
This commit is contained in:
14
README.md
14
README.md
@@ -116,12 +116,12 @@ source install.sh
|
||||
#### Device 1:
|
||||
|
||||
```sh
|
||||
python3 main.py
|
||||
exo
|
||||
```
|
||||
|
||||
#### Device 2:
|
||||
```sh
|
||||
python3 main.py
|
||||
exo
|
||||
```
|
||||
|
||||
That's it! No configuration required - exo will automatically discover the other device(s).
|
||||
@@ -187,14 +187,14 @@ curl http://localhost:8000/v1/chat/completions \
|
||||
#### Device 1 (MacOS):
|
||||
|
||||
```sh
|
||||
python3 main.py --inference-engine tinygrad
|
||||
exo --inference-engine tinygrad
|
||||
```
|
||||
|
||||
Here we explicitly tell exo to use the **tinygrad** inference engine.
|
||||
|
||||
#### Device 2 (Linux):
|
||||
```sh
|
||||
python3 main.py
|
||||
exo
|
||||
```
|
||||
|
||||
Linux devices will automatically default to using the **tinygrad** inference engine.
|
||||
@@ -207,18 +207,18 @@ You can read about tinygrad-specific env vars [here](https://docs.tinygrad.org/e
|
||||
Enable debug logs with the DEBUG environment variable (0-9).
|
||||
|
||||
```sh
|
||||
DEBUG=9 python3 main.py
|
||||
DEBUG=9 exo
|
||||
```
|
||||
|
||||
For the **tinygrad** inference engine specifically, there is a separate DEBUG flag `TINYGRAD_DEBUG` that can be used to enable debug logs (1-6).
|
||||
|
||||
```sh
|
||||
TINYGRAD_DEBUG=2 python3 main.py
|
||||
TINYGRAD_DEBUG=2 exo
|
||||
```
|
||||
|
||||
## Known Issues
|
||||
|
||||
- On some versions of MacOS/Python, certificates are not installed properly which can lead to SSL errors (e.g. SSL error with huggingface.co). To fix this, run the Install Certificates command, usually:
|
||||
- On some versions of MacOS/Python, certificates are not installed properly which can lead to SSL errors (e.g. SSL error with huggingface.co). To fix this, run the Install Certificates command, usually:
|
||||
|
||||
```sh
|
||||
/Applications/Python 3.x/Install Certificates.command
|
||||
|
||||
@@ -176,7 +176,7 @@ class ChatGPTAPI:
|
||||
cors.add(self.app.router.add_post("/chat/completions", self.handle_post_chat_completions), {"*": cors_options})
|
||||
cors.add(self.app.router.add_post("/v1/chat/completions", self.handle_post_chat_completions), {"*": cors_options})
|
||||
|
||||
self.static_dir = Path(__file__).parent.parent.parent/"tinychat/examples/tinychat"
|
||||
self.static_dir = Path(__file__).parent.parent/"tinychat"
|
||||
self.app.router.add_get("/", self.handle_root)
|
||||
self.app.router.add_static("/", self.static_dir, name="static")
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ def is_valid_uuid(val):
|
||||
|
||||
|
||||
def get_or_create_node_id():
|
||||
NODE_ID_FILE = Path(os.path.dirname(os.path.abspath(__file__)))/".exo_node_id"
|
||||
NODE_ID_FILE = Path(tempfile.gettempdir()) / ".exo_node_id"
|
||||
try:
|
||||
if NODE_ID_FILE.is_file():
|
||||
with open(NODE_ID_FILE, "r") as f:
|
||||
|
||||
0
exo/inference/tinygrad/__init__.py
Normal file
0
exo/inference/tinygrad/__init__.py
Normal file
0
exo/inference/tinygrad/models/__init__.py
Normal file
0
exo/inference/tinygrad/models/__init__.py
Normal file
@@ -186,7 +186,7 @@ async def main():
|
||||
await asyncio.Event().wait()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def run():
|
||||
loop = asyncio.new_event_loop()
|
||||
asyncio.set_event_loop(loop)
|
||||
try:
|
||||
@@ -196,3 +196,6 @@ if __name__ == "__main__":
|
||||
finally:
|
||||
loop.run_until_complete(shutdown(signal.SIGTERM, loop))
|
||||
loop.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
0
exo/networking/tailscale/__init__.py
Normal file
0
exo/networking/tailscale/__init__.py
Normal file
0
exo/networking/udp/__init__.py
Normal file
0
exo/networking/udp/__init__.py
Normal file
|
Before Width: | Height: | Size: 750 B After Width: | Height: | Size: 750 B |
Reference in New Issue
Block a user