recognize icon indicating copy to clipboard operation
recognize copied to clipboard

How to set CUDA location?

Open frenzybiscuit opened this issue 1 year ago • 3 comments

Which version of recognize are you using?

8.1.1

Enabled Modes

Object recognition, Face recognition, Video recognition, Music recognition

TensorFlow mode

GPU mode

Downstream App

Files App

Which Nextcloud version do you have installed?

30.0.2

Which Operating system do you have installed?

Fedora 41

Which database are you running Nextcloud on?

Postgresql 16

Which Docker container are you using to run Nextcloud? (if applicable)

None

How much RAM does your server have?

128GB

What processor Architecture does your CPU have?

x86_64

Describe the Bug

I am trying to use GPU mode with a Nvidia 2080 GPU. the install is bare metal. Everything appears to be green/work up until CUDA.

I am using fedora with selinux in permissive mode.

Current error:

Successfully loaded libtensorflow in Node.js, but couldn't load GPU. Make sure CUDA Toolkit and cuDNN are installed and accessible, or turn off GPU mode.

When using CUDA, I have to specify the path location in .bashrc for my regular users. I'm assuming this is the issue with Nextcloud/Recognize. If I do not specify this in the .bashrc cuda refuses to work/compile.

The path should be:

export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

Is there a way to set this in the recognize app?

Expected Behavior

works as expected

To Reproduce

N/A

Debug log

N/A

frenzybiscuit avatar Dec 03 '24 06:12 frenzybiscuit

Hello :wave:

Thank you for taking the time to open this issue with recognize. I know it's frustrating when software causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at and if possible solved. I try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it. Until then, please be patient. Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can collaborate to make this software better. For everyone. Thus, if you can, you could also look at other issues to see whether you can help other people with your knowledge and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and try to fix the odd bug yourself. Everyone will be thankful for extra helping hands! One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum, to twitter or somewhere else. But this is a technical issue tracker, so please make sure to focus on the tech and keep your opinions to yourself. (Also see our Code of Conduct. Really.)

I look forward to working with you on this issue Cheers :blue_heart:

github-actions[bot] avatar Dec 03 '24 06:12 github-actions[bot]

See https://stackoverflow.com/questions/13428910/how-to-set-the-environment-variable-ld-library-path-in-linux and https://help.ubuntu.com/community/EnvironmentVariables#System-wide_environment_variables

marcelklehr avatar Dec 03 '24 07:12 marcelklehr

In case if you use Docker, this might be an easier approach as I've spent significant amount of time getting it to work, hence shared to save time for others: https://github.com/bugsyb/recognize_docker

It has all set up and working and is being from source images from nVIDIA, PHP, Nextcloud.

bugsyb avatar Dec 08 '24 09:12 bugsyb

@bugsyb: Can you upload your docker container on docker hub? Or anywhere else? As mentioned in the issues of your github repo, I am not able to build the docker container due to the errors.

SimonBard avatar Jun 25 '25 11:06 SimonBard

Apologies for missing above - been on off the grid holidays and then notification disappeared in jungle of other updates/spam.

If this is still open for you, provide the exact details of your environment, docker version specifically. I'm happy to re-try builds for you and see where the problem is to help others too. The image is way too big, hence, can't upload it.

bugsyb avatar Oct 04 '25 09:10 bugsyb