jan icon indicating copy to clipboard operation
jan copied to clipboard

feat: Use Another Jan over LAN

Open owenzhao opened this issue 1 year ago • 3 comments

Problem I have PCs and Macs. However, I found Jan runs more quickly on PC with Nvidia GPU. So when I am using a Mac, I still want to use Jan on the PC. Is that possible Mac's Jan pass question to PC and get answer back instead of run Jan locally?

owenzhao avatar Apr 06 '24 03:04 owenzhao

Hi ! Same setup for me (a Mac and a Windows PC with a big GPU). Wanted to use Jan UI on my Mac with the service running on my GPU Windows PC. I installed the server on windows with docker/wsl2. On my lan with my Mac I can connect to the API server (1337) but not to the 3000 port UI. I look a little and its appear that some call are to the "server" IP but some are to the localhost. The page stay white blank. (Not sure at all if it's the reason, I'm not a dev and just starting to discover the LLM world). Thank you and great work ☺️

ItsAperoTime avatar Apr 08 '24 07:04 ItsAperoTime

Hi there, you might be interested in this part: https://github.com/janhq/jan?tab=readme-ov-file#docker-mode

Note: On windows, please use WSL instead of Windows container because windows container have performance problem + cannot use GPUs once you deploy it, you can access the Jan web and api from external devices https://jan.ai/docs/installation/server#step-2-get-jan-server

Van-QA avatar Apr 08 '24 16:04 Van-QA

Hi there, you might be interested in this part: https://github.com/janhq/jan?tab=readme-ov-file#docker-mode

Note: On windows, please use WSL instead of Windows container because windows container have performance problem + cannot use GPUs once you deploy it, you can access the Jan web and api from external devices https://jan.ai/docs/installation/server#step-2-get-jan-server

Thank you for your help Van-QA. Don't know about owenzhao but I my case I have deploy janAI with WSL and docker (with the docker compose of dev and main(the doc says curl the dev)) and I can access to the swagger UI (1337 port) from my devices on the LAN but for the web UI (3000 port) I can't, I have a blank page. However I can access to the web UI from my Windows server (the server host with jan AI on wsl) but cannot with my other computer like my Mac on the LAN.

I looked in the dev console and see an error like this when the getActiveExtensions page is loader (It seems to try access localhost and not the server's IP in the URL but I don't know if this has to do with the problem or not) Capture d’écran 2024-04-13 à 14 50 57

ItsAperoTime avatar Apr 13 '24 12:04 ItsAperoTime

Hi @owenzhao, it's possible. You can turn on the API Server and use the exposed IP://{api_prefix}/chat/completions endpoint on another Jan client (OpenAI Extension Settings).

louis-jan avatar Apr 25 '24 12:04 louis-jan

@ItsAperoTime please help update the API_BASE_URL from Dockerfile to your real remote server IP address.

louis-jan avatar Apr 25 '24 12:04 louis-jan

See more here: https://discord.com/channels/1107178041848909847/1149558035971321886/1229708106825596999

louis-jan avatar Apr 25 '24 12:04 louis-jan