To start a new instance to share:
# Start a new instance to share with --federated and a TOKEN
export TOKEN="b3RwOgogIGRodDoKICAgIGludGVydmFsOiAxMjAKICAgIGtleTogQ2ZURlBraG92d0dQR285SjRacDVscGI4ME5UVUgyTlg4SHZ0TnpWaDFOUwogICAgbGVuZ3RoOiA0MwogIGNyeXB0bzoKICAgIGludGVydmFsOiA5MDAwCiAgICBrZXk6IEhMWkthczlySDE3QTJNV1NoRHpRclU1ak5jdjJDT3RIT1VBa2t1dno4a1YKICAgIGxlbmd0aDogNDMKcm9vbTogZTFkajM4dEFRTVZzNFVtNTRjTThjWlE3YThQN2YyZGd4NEltUUhXeld1YQpyZW5kZXp2b3VzOiBTQlp5VWlsVGJSM3NSY0taeWFxSVVLUG9XNWdXbU5sMUpaQWNKVEszWlB3Cm1kbnM6IE9LQjRhSkhOOGx1TmNRU3liblVramtvRmI1SmRGY1JTTUt3ajNwR3dRSGgKbWF4X21lc3NhZ2Vfc2l6ZTogMjA5NzE1MjAK"
local-ai run --federated --p2p
Note: If you don't have a token do not specify it and use the generated one that you can find in this page.
To start a new federated load balancer:
export TOKEN="b3RwOgogIGRodDoKICAgIGludGVydmFsOiAxMjAKICAgIGtleTogQ2ZURlBraG92d0dQR285SjRacDVscGI4ME5UVUgyTlg4SHZ0TnpWaDFOUwogICAgbGVuZ3RoOiA0MwogIGNyeXB0bzoKICAgIGludGVydmFsOiA5MDAwCiAgICBrZXk6IEhMWkthczlySDE3QTJNV1NoRHpRclU1ak5jdjJDT3RIT1VBa2t1dno4a1YKICAgIGxlbmd0aDogNDMKcm9vbTogZTFkajM4dEFRTVZzNFVtNTRjTThjWlE3YThQN2YyZGd4NEltUUhXeld1YQpyZW5kZXp2b3VzOiBTQlp5VWlsVGJSM3NSY0taeWFxSVVLUG9XNWdXbU5sMUpaQWNKVEszWlB3Cm1kbnM6IE9LQjRhSkhOOGx1TmNRU3liblVramtvRmI1SmRGY1JTTUt3ajNwR3dRSGgKbWF4X21lc3NhZ2Vfc2l6ZTogMjA5NzE1MjAK"
local-ai federated
Note: Token is needed when starting the federated server.
For all the options available, please refer to the documentation.
To start a new federated instance:
docker run -ti --net host -e TOKEN="b3RwOgogIGRodDoKICAgIGludGVydmFsOiAxMjAKICAgIGtleTogQ2ZURlBraG92d0dQR285SjRacDVscGI4ME5UVUgyTlg4SHZ0TnpWaDFOUwogICAgbGVuZ3RoOiA0MwogIGNyeXB0bzoKICAgIGludGVydmFsOiA5MDAwCiAgICBrZXk6IEhMWkthczlySDE3QTJNV1NoRHpRclU1ak5jdjJDT3RIT1VBa2t1dno4a1YKICAgIGxlbmd0aDogNDMKcm9vbTogZTFkajM4dEFRTVZzNFVtNTRjTThjWlE3YThQN2YyZGd4NEltUUhXeld1YQpyZW5kZXp2b3VzOiBTQlp5VWlsVGJSM3NSY0taeWFxSVVLUG9XNWdXbU5sMUpaQWNKVEszWlB3Cm1kbnM6IE9LQjRhSkhOOGx1TmNRU3liblVramtvRmI1SmRGY1JTTUt3ajNwR3dRSGgKbWF4X21lc3NhZ2Vfc2l6ZTogMjA5NzE1MjAK" --name local-ai -p 8080:8080 localai/localai:latest-cpu run --federated --p2p
To start a new federated server with Docker (port to 9090):
docker run -ti --net host -e TOKEN="b3RwOgogIGRodDoKICAgIGludGVydmFsOiAxMjAKICAgIGtleTogQ2ZURlBraG92d0dQR285SjRacDVscGI4ME5UVUgyTlg4SHZ0TnpWaDFOUwogICAgbGVuZ3RoOiA0MwogIGNyeXB0bzoKICAgIGludGVydmFsOiA5MDAwCiAgICBrZXk6IEhMWkthczlySDE3QTJNV1NoRHpRclU1ak5jdjJDT3RIT1VBa2t1dno4a1YKICAgIGxlbmd0aDogNDMKcm9vbTogZTFkajM4dEFRTVZzNFVtNTRjTThjWlE3YThQN2YyZGd4NEltUUhXeld1YQpyZW5kZXp2b3VzOiBTQlp5VWlsVGJSM3NSY0taeWFxSVVLUG9XNWdXbU5sMUpaQWNKVEszWlB3Cm1kbnM6IE9LQjRhSkhOOGx1TmNRU3liblVramtvRmI1SmRGY1JTTUt3ajNwR3dRSGgKbWF4X21lc3NhZ2Vfc2l6ZTogMjA5NzE1MjAK" --name local-ai -p 9090:8080 localai/localai:latest-cpu federated
For all the options available and see what image to use, please refer to the Container images documentation and CLI parameters documentation.