diff --git a/core/http/views/p2p.html b/core/http/views/p2p.html index c1d4ec1adffe..586469629c51 100644 --- a/core/http/views/p2p.html +++ b/core/http/views/p2p.html @@ -10,6 +10,110 @@ {{template "views/partials/inprogress" .}}
+ {{ if eq .P2PToken "" }} + +
+
+
+
+ +
+

+ + P2P Distribution Not Enabled + +

+

+ Enable peer-to-peer distribution to scale your AI workloads across multiple devices. Share instances, shard models, and pool computational resources across your network. +

+ + +
+
+
+ +
+

Instance Federation

+

Load balance across multiple instances

+
+
+
+ +
+

Model Sharding

+

Split large models across workers

+
+
+
+ +
+

Resource Sharing

+

Pool resources from multiple devices

+
+
+ + +
+

+ + How to Enable P2P +

+
+
+
+ 1 +
+
+

Start LocalAI with P2P enabled

+ + local-ai run --p2p + +

This will automatically generate a network token for you.

+
+
+
+
+ 2 +
+
+

Or use an existing token

+ + export TOKEN="your-token-here"
+ local-ai run --p2p +
+

If you already have a token from another instance, you can reuse it.

+
+
+
+
+ 3 +
+
+

Access the P2P dashboard

+

Once enabled, refresh this page to see your network token and start connecting nodes.

+
+
+
+
+ + +
+
+ {{ else }} +
@@ -129,22 +233,6 @@

Network Token

The network token can be used to either share the instance or join a federation or a worker network. Below you will find examples on how to start a new instance or a worker with this token.

- - - {{ if eq .P2PToken "" }} -
-
- -

Warning: P2P token was not specified

-
-

- You have to enable P2P mode by starting LocalAI with --p2p. Please restart the server with --p2p to generate a new token automatically that can be used to discover other nodes. If you already have a token, specify it with export TOKEN=".." - - Check out the documentation for more information. - -

-
- {{ else }}
@@ -507,13 +595,15 @@

- {{ end }}
+ {{ end }} {{template "views/partials/footer" .}} +{{ if ne .P2PToken "" }} +{{ end }} +{{ if ne .P2PToken "" }} +{{ else }} + +{{ end }}