Qt Creator is always looking for Ollama since the latest update
-
@Robert-Hairgrove check under Preferences > AI > Custom Language Models if you have something there.
This feature was added a while ago to help with error messages, and AFAIK it uses ollama.
@cristian-adam Thanks, but there is nothing listed there.
-
@cristian-adam Thanks, but there is nothing listed there.
@Robert-Hairgrove https://github.com/qt-creator/qt-creator/commit/e38993883ab52878b85212607f3528522c5c553a was for me the only ollama feature that I knew of in 19.0.2.
Maybe you can use
straceto find out who is trying to access the folder. -
@Robert-Hairgrove https://github.com/qt-creator/qt-creator/commit/e38993883ab52878b85212607f3528522c5c553a was for me the only ollama feature that I knew of in 19.0.2.
Maybe you can use
straceto find out who is trying to access the folder.@cristian-adam Thanks again. I tried
stracebut couldn't find anything. Unfortunately, I don't know the right options to use. It looks like the call tofindis buried deeply in the parsing of the code base for the project.However, I looked at the way
ollamainstalls the directory under/usr/shared. I'm surprised that this could ever work since permissions for the.nvdirectory are severely restricted::bob@laptop:/usr/share/ollama$ ls -al total 40 drwxr-x--- 4 ollama ollama 4096 Dec 25 17:23 . drwxr-xr-x 377 root root 16384 May 25 12:17 .. -rw-r--r-- 1 ollama ollama 220 Mar 31 2024 .bash_logout -rw-r--r-- 1 ollama ollama 3771 Mar 31 2024 .bashrc drwx------ 3 ollama ollama 4096 Dec 25 17:23 .nv <== permissions? drwxr-xr-x 3 ollama ollama 4096 Dec 25 17:23 .ollama -rw-r--r-- 1 ollama ollama 807 Mar 31 2024 .profileTo install
ollama, I just followed the instructions given on their website -- nothing special. -
@cristian-adam Thanks again. I tried
stracebut couldn't find anything. Unfortunately, I don't know the right options to use. It looks like the call tofindis buried deeply in the parsing of the code base for the project.However, I looked at the way
ollamainstalls the directory under/usr/shared. I'm surprised that this could ever work since permissions for the.nvdirectory are severely restricted::bob@laptop:/usr/share/ollama$ ls -al total 40 drwxr-x--- 4 ollama ollama 4096 Dec 25 17:23 . drwxr-xr-x 377 root root 16384 May 25 12:17 .. -rw-r--r-- 1 ollama ollama 220 Mar 31 2024 .bash_logout -rw-r--r-- 1 ollama ollama 3771 Mar 31 2024 .bashrc drwx------ 3 ollama ollama 4096 Dec 25 17:23 .nv <== permissions? drwxr-xr-x 3 ollama ollama 4096 Dec 25 17:23 .ollama -rw-r--r-- 1 ollama ollama 807 Mar 31 2024 .profileTo install
ollama, I just followed the instructions given on their website -- nothing special.@Robert-Hairgrove
Since Google/AI says:Yes, you can delete the
.nvfolder. It is simply a temporary cache. However, the very next time you run a heavy model on your NVIDIA GPU, Ollama and the CUDA driver will automatically regenerate the folder to store the necessary computational kernels.have you tried deleting it or changing its permissions?
-
@Robert-Hairgrove
Since Google/AI says:Yes, you can delete the
.nvfolder. It is simply a temporary cache. However, the very next time you run a heavy model on your NVIDIA GPU, Ollama and the CUDA driver will automatically regenerate the folder to store the necessary computational kernels.have you tried deleting it or changing its permissions?
@JonB said in Qt Creator is always looking for Ollama since the latest update:
have you tried deleting it or changing its permissions?
No. Why should I have to do that? If Ollama sets those permissions by default, then there must be a reason for that, IMHO.
-
@JonB said in Qt Creator is always looking for Ollama since the latest update:
have you tried deleting it or changing its permissions?
No. Why should I have to do that? If Ollama sets those permissions by default, then there must be a reason for that, IMHO.
@Robert-Hairgrove said in Qt Creator is always looking for Ollama since the latest update:
No. Why should I have to do that?
Because you would see if that makes a difference and allows it to work. I quoted you where it says it's a temporary directory and can be deleted anyway. But instead of trying that you are welcome to live with the warning message you do not like.
If Ollama sets those permissions by default, then there must be a reason for that, IMHO
The permissions look like they may be fine if/when Ollama runs as
ollamauser. Your problem seems to be Creator (if that is what is issuing the message) choosing to run somefindcommand, for whatever reason, which may be nothing to do with Ollama itself. -
:-1: error: find: ‘/usr/share/ollama/.nv’: Permission deniedDoes the .pro file that you open in Qt Creator contain some $$system command or such that triggers find? These might be executed whenever Qt Creator parses the project. You can turn that off in "Preferences > Build & Run > Qmake > Ignore qmake's system() function", but that might also break project loading if that does something essential for your .pro file. The find command might also be triggered by some other included .pri file, or .prf file or by some other tool that is run (no idea what e.g. pkg_config might do for finding packages, though I'd assume that that doesn't do a global find....)
If you can reproduce the issue when running qmake for the project from the command line, you can try running qmake with the "-d" option (possibly multiple 'd's to increase verbosity) to find out what calls find.
-
:-1: error: find: ‘/usr/share/ollama/.nv’: Permission deniedDoes the .pro file that you open in Qt Creator contain some $$system command or such that triggers find? These might be executed whenever Qt Creator parses the project. You can turn that off in "Preferences > Build & Run > Qmake > Ignore qmake's system() function", but that might also break project loading if that does something essential for your .pro file. The find command might also be triggered by some other included .pri file, or .prf file or by some other tool that is run (no idea what e.g. pkg_config might do for finding packages, though I'd assume that that doesn't do a global find....)
If you can reproduce the issue when running qmake for the project from the command line, you can try running qmake with the "-d" option (possibly multiple 'd's to increase verbosity) to find out what calls find.
@ziller Thanks for the suggestions. But I got along fine without
ollamauntil I started using Qt Linguist's AI translation feature. I can just ignore the error since it doesn't seem to have any side effects. But it seems like a bug to me -- not one I am presently motivated to find, however. -
I changed the permissions on the
.nvfolder and the (empty) subfolderComputeCacheit contains. The error was not reported by Qt Creator any more, but I'm not sure it is a good idea to leave the permissions this way. Theollamaservice can run as a different user thanollama. In order to be able to connect to the service using Qt Linguis, I need to either start the service configured to use a different user, i.e. my own user, or else stop the service and start it from a terminal. Then I can use Qt Linguist. I'm not sure why this is, because if I letollamarun as theollamauser, I can send requests throughlocalhostwithout any probem (I also have Apache running in the background, BTW).I noticed that when
ollamais running as my own user, I get a folder.nvin my home directory which has my user listed as owner and group. Presumably, Qt Creator is just checking to see whether it can access Ollama as my user or not, and uses thefindcommand to locate the.nvfolder -- perhaps without ever actually needing to use it. If this is the case, "Permission denied" errors should be ignored and not propagated to Qt Creator application output. This is the offending behavior. -
I would like to add that I haven't been able to reproduce the issue when creating and opening "Hello World"-type projects. I do have some
$$system()calls in the.profile where it happens, but these are necessary (many are for finding programs likepkg-config, which was mentioned).But none of the external system calls have anything to do with
ollama, and I really only use it in Qt Linguist which is referenced through theExternal Toolsmenu in Qt Creator. Maybe over the weekend I will have time to investigate further.