Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bounty] make embedded AI work on windows #682

Open
louis030195 opened this issue Nov 14, 2024 · 13 comments
Open

[bounty] make embedded AI work on windows #682

louis030195 opened this issue Nov 14, 2024 · 13 comments
Labels
💎 Bounty enhancement New feature or request

Comments

@louis030195
Copy link
Collaborator

louis030195 commented Nov 14, 2024

serve_command = serve_command.env("OLLAMA_ORIGINS", "*");

ollama on windows needs OLLAMA_ORIGINS=* because its CORS blocks Tauri network protocol

for some reason the thing i did does not work (adding the env in the command)

/bounty 50

definition of done:

  • windows users can run embedded AI and use it in the chat or timeline or elsewhere
  • e.g. fix it, test it, share screenshot/video to prove it works (maybe use setx or idk)

also it would be good in general to make sure the OLLAMA_ORIGINS=* is sat regardless if the user use embedded AI, but do this code in app code (not CLI)

@louis030195 louis030195 added the enhancement New feature or request label Nov 14, 2024
Copy link

linear bot commented Nov 14, 2024

Copy link

algora-pbc bot commented Nov 14, 2024

💎 $50 bounty • Screenpi.pe

Steps to solve:

  1. Start working: Comment /attempt #682 with your implementation plan
  2. Submit work: Create a pull request including /claim #682 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to mediar-ai/screenpipe!

Add a bountyShare on socials

@tribhuwan-kumar
Copy link
Contributor

tribhuwan-kumar commented Nov 14, 2024

ollama/ollama#703 (comment)

i think this is going to fix this issue!

image

@tribhuwan-kumar
Copy link
Contributor

tribhuwan-kumar commented Nov 14, 2024

image
image

i'm able to run this but its searching for cublas64_11.dll instead of cublas64_12.dll which doesn't exists (cublas64_11.dll)
maybe i need to also fix this #602

ps: this is awesome SYSTRAN/faster-whisper#535 (comment)

@louis030195
Copy link
Collaborator Author

louis030195 commented Nov 15, 2024

image image

i'm able to run this but its searching for cublas64_11.dll instead of cublas64_12.dll which doesn't exists (cublas64_11.dll) maybe i need to also fix this #602

ps: this is awesome SYSTRAN/faster-whisper#535 (comment)

how do you ran this ollama?

here's the thing:

we have to delete old cuda libs because tauri crash if the build has too many files, so we only keep cuda 12 libs

do you have a nvidia gpu? which? maybe only support cuda 11

@tribhuwan-kumar
Copy link
Contributor

how do you ran this ollama?

by adding this line serve_command = serve_command.env("OLLAMA_HOST", "0.0.0.0"); in windows env, even though its not neccesary there is already env for OLLAMA_HOST, here:


then from app ui started it

we have to delete old cuda libs because tauri crash if the build has too many files, so we only keep cuda 12 libs
do you have a nvidia gpu? which? maybe only support cuda 11,

yes, i tested in rtx 2050 which old, but its cuda capable
i also have rtx 4060, & i think this issue shouldn't cause in rtx 4060

@tribhuwan-kumar
Copy link
Contributor

tribhuwan-kumar commented Nov 15, 2024

ollama on windows needs OLLAMA_ORIGINS=* because its CORS blocks Tauri network protocol

for some reason the thing i did does not work (adding the env in the command)

just tested with full lib folder without deleting anything, and it worked like a charm, there is not OLLAMA_HOST or OLLAMA_ORIGIN error.
if there is even an error related to ollama's env, i can't reproduce it :(

image
Screenshot 2024-11-15 133949

@tribhuwan-kumar
Copy link
Contributor

since the problem with build, so we can't keep all the ollama lib files, in that case users must have to install cuda toolkit, (i've tested this) which can be rough for normal windows users also cuda toolkit takes too much space.

maybe we could use something like this tauri-apps/tauri#7372 (comment) this way embedded ai will not depend on cuda toolkit and all the requirement of cublas64_11.dll etc will also satisfied

@tribhuwan-kumar
Copy link
Contributor

386379297-8aaa408c-7f46-42a7-8366-92265aae3557

this issue isn't causing in rtx4060

@louis030195
Copy link
Collaborator Author

hmm yeah maybe something likle the ffmpeg-sidecar we use that download ollama at runtime and install it?

@tribhuwan-kumar
Copy link
Contributor

tribhuwan-kumar commented Nov 20, 2024

hmm yeah maybe something likle the ffmpeg-sidecar we use that download ollama at runtime and install it?

this should work, working on it!!

@louis030195
Copy link
Collaborator Author

@tribhuwan-kumar btw the best would be that it's in the screenpipe core code under the llm feature flag

we had done this with Candle lib but in the end used ollama because there was too much stuff to do
so there is some leftover dead code related to this that you can safely remove and we would use this ollama downloaded/sidecar for all OSes at the core lib level

so CLI users could also have the LLM thing without the app

hope it's clear enough

@tribhuwan-kumar
Copy link
Contributor

@tribhuwan-kumar btw the best would be that it's in the screenpipe core code under the llm feature flag

we had done this with Candle lib but in the end used ollama because there was too much stuff to do so there is some leftover dead code related to this that you can safely remove and we would use this ollama downloaded/sidecar for all OSes at the core lib level

so CLI users could also have the LLM thing without the app

hope it's clear enough

yes, that'd be better. all kind of users can use the embeded ai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 Bounty enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants