Help installing CPAI on linux (Debian)

Hans007

Young grasshopper
Nov 21, 2016
74
17
im slowly migrating all my servers/systems from physical pcs to virtual using proxmox (version 9). and managed to run BI in a VM windows but the issue that i have is with CPAI.
im trying to install CPAI in a LXC container running debian 12 using following guide: CodeProject.AI on Ubuntu.
But no matter what i do i keep getting these error when running pushd "/usr/bin/codeproject.ai-server-2.9.5/server" && bash ../setup.sh && popd
Bash:
12:29:57:System:           Linux
12:29:57:Operating System: Linux (Debian GNU/Linux 12 bookworm)
12:29:57:CPUs:             Intel(R) Core(TM) i5-14500 (Intel)
12:29:57:                  1 CPU x 14 cores. 20 logical processors (x64)
12:29:57:System RAM:       8 GiB
12:29:57:Platform:         Linux
12:29:57:BuildConfig:      Release
12:29:57:Execution Env:    Native
12:29:57:Runtime Env:      Production
12:29:57:Runtimes installed:
12:29:57:  .NET runtime:     9.0.8
12:29:57:  .NET SDK:         9.0.304
12:29:57:  Default Python:   3.11.2
12:29:57:  Go:               Not found
12:29:57:  NodeJS:           Not found
12:29:57:  Rust:             Not found
12:29:57:App DataDir:      /etc/codeproject/ai
12:29:57:Video adapter info:
12:29:57:STARTING CODEPROJECT.AI SERVER
12:29:57:RUNTIMES_PATH             = /usr/bin/codeproject.ai-server-2.9.5/runtimes
12:29:57:PREINSTALLED_MODULES_PATH = /usr/bin/codeproject.ai-server-2.9.5/preinstalled-modules
12:29:57:DEMO_MODULES_PATH         = /usr/bin/codeproject.ai-server-2.9.5/src/demos/modules
12:29:57:EXTERNAL_MODULES_PATH     = /usr/bin/CodeProject.AI-Modules
12:29:57:MODULES_PATH              = /usr/bin/codeproject.ai-server-2.9.5/modules
12:29:57:PYTHON_PATH               = /bin/debian gnu/linux/%PYTHON_NAME%/venv/bin/python3
12:29:57:Data Dir                  = /etc/codeproject/ai
12:29:57:Server version:   2.9.5
12:29:57:ModuleRunner Start
12:29:57:No record of a previous module installation found. Running install
12:29:57:Starting Background AI Modules
12:30:00:Setting up initial modules. Please be patient...
12:30:00:Installing initial module FaceProcessing.
12:30:00:Preparing to install module 'FaceProcessing'
12:30:01:Downloading module 'FaceProcessing'
12:30:01:Installing module 'FaceProcessing'
12:30:01:Installer script at '/usr/bin/codeproject.ai-server-2.9.5/setup.sh'
12:30:01:FaceProcessing: Setting verbosity to quiet
12:30:01:FaceProcessing: (No schemas means: we can't detect if you're in light or dark mode)
12:30:01:FaceProcessing:              Installing CodeProject.AI Analysis Module               
12:30:01:FaceProcessing: ======================================================================
12:30:01:FaceProcessing:                    CodeProject.AI Installer                           
12:30:01:FaceProcessing: ======================================================================
12:30:01:FaceProcessing: 45.00 GiB of 50.08 GiB available on linux (linux debian x86_64 - linux)
12:30:01:FaceProcessing: Installing psmisc...
12:30:01:FaceProcessing: Installing xz-utils...
12:30:01:FaceProcessing: Installing jq...
12:30:01:FaceProcessing: E: Could not get lock /var/lib/apt/lists/lock. It is held by process 534 (apt-get)
12:30:01:FaceProcessing: E: Unable to lock directory /var/lib/apt/lists/
12:30:02:FaceProcessing: E: Could not get lock /var/lib/apt/lists/lock. It is held by process 534 (apt-get)
12:30:02:FaceProcessing: E: Unable to lock directory /var/lib/apt/lists/
12:30:02:Server: This is the latest version
12:30:02:Current Version is 2.9.5
12:30:15:FaceProcessing: General CodeProject.AI setup                                         
12:30:15:FaceProcessing: Setting permissions on runtimes folder...done
12:30:15:FaceProcessing: Setting permissions on general downloads folder...done
12:30:15:FaceProcessing: Creating module asset downloads folder...done
12:30:15:FaceProcessing: Setting permissions on module asset downloads folder...done
12:30:15:FaceProcessing: Setting permissions on modules folder...done
12:30:15:FaceProcessing: Setting permissions on models folder...done
12:30:15:FaceProcessing: Setting permissions on persisted data folder...done
12:30:15:FaceProcessing: GPU support                                                           
12:30:15:FaceProcessing: Installing NVIDIA keyring
12:30:17:FaceProcessing:   Installing cuDNN
12:31:25:FaceProcessing:   Installing CUDA toolkit
12:31:25:FaceProcessing: 'deb http://deb.debian.org/debian bookworm main' not found. Adding 'deb http://deb.debian.org/debian bookworm main contrib non-free' to sources.list...
12:31:25:FaceProcessing: 'deb-src http://deb.debian.org/debian bookworm main' not found. Adding 'deb-src http://deb.debian.org/debian bookworm main contrib non-free' to sources.list...
12:31:26:FaceProcessing:  Installing cuda kit
12:50:01:Module FaceProcessing installed successfully.
12:50:01:Unable to install FaceProcessing: Timed out attempting to install Module 'FaceProcessing' (A task was canceled.)
12:50:01:Installing initial module ObjectDetectionYOLOv5Net.
12:50:01:Preparing to install module 'ObjectDetectionYOLOv5Net'
12:50:01:Downloading module 'ObjectDetectionYOLOv5Net'
12:50:01:FaceProcessing:  Searching for nvidia-cuda-toolkit...installing...
12:50:01:Running module using: /usr/bin/codeproject.ai-server-2.9.5/runtimes/bin/debian gnu/linux/python38/venv/bin/python3
12:50:01:
12:50:01:Module 'Face Processing' 1.12.3 (ID: FaceProcessing)
12:50:01:Valid:            True
12:50:01:Module Path:      <root>/modules/FaceProcessing
12:50:01:Module Location:  Internal
12:50:01:AutoStart:        True
12:50:01:Queue:            faceprocessing_queue
12:50:01:Runtime:          python3.8
12:50:01:Runtime Location: Shared
12:50:01:FilePath:         intelligencelayer/face.py
12:50:01:Start pause:      3 sec
12:50:01:Parallelism:      0
12:50:01:LogVerbosity:
12:50:01:Platforms:        all,!jetson
12:50:01:GPU Libraries:    installed if available
12:50:01:GPU:              use if supported
12:50:01:Accelerator:
12:50:01:Half Precision:   enable
12:50:01:Environment Variables
12:50:01:APPDIR             = <root>/modules/FaceProcessing/intelligencelayer
12:50:01:Starting /usr.../debian gnu/linux/python38/venv/bin/python3 "/usr.../FaceProcessing/intelligencelayer/face.py"
12:50:01:
12:50:01:Attempting to start FaceProcessing with /usr/bin/codeproject.ai-server-2.9.5/runtimes/bin/debian gnu/linux/python38/venv/bin/python3 "/usr/bin/codeproject.ai-server-2.9.5/modules/FaceProcessing/intelligencelayer/face.py"
12:50:01:DATA_DIR           = /etc/codeproject/ai
12:50:01:MODE               = MEDIUM
12:50:01:MODELS_DIR         = <root>/modules/FaceProcessing/assets
12:50:01:PROFILE            = desktop_gpu
12:50:01:USE_CUDA           = True
12:50:01:YOLOv5_AUTOINSTALL = false
12:50:01:YOLOv5_VERBOSE     = false
12:50:01:
12:50:01:Error trying to start Face Processing (intelligencelayer/face.py)
12:50:01:Error is: An error occurred trying to start process '/usr/bin/codeproject.ai-server-2.9.5/runtimes/bin/debian gnu/linux/python38/venv/bin/python3' with working directory '/usr/bin/codeproject.ai-server-2.9.5/modules/FaceProcessing'. No such file or directory
12:50:01:   at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at CodeProject.AI.Server.Modules.ModuleProcessServices.StartProcess(ModuleConfig module, String installSummary)
12:50:01:Please check the CodeProject.AI installation completed successfully
12:50:01:Module FaceProcessing started successfully.
12:50:01:Installing module 'ObjectDetectionYOLOv5Net'
12:50:01:Installer script at '/usr/bin/codeproject.ai-server-2.9.5/setup.sh'
12:50:01:ObjectDetectionYOLOv5Net: Setting verbosity to quiet
12:50:01:ObjectDetectionYOLOv5Net: (No schemas means: we can't detect if you're in light or dark mode)
12:50:01:ObjectDetectionYOLOv5Net:              Installing CodeProject.AI Analysis Module               
12:50:01:ObjectDetectionYOLOv5Net: ======================================================================
12:50:01:ObjectDetectionYOLOv5Net:                    CodeProject.AI Installer                           
12:50:01:ObjectDetectionYOLOv5Net: ======================================================================
12:50:01:ObjectDetectionYOLOv5Net: 27.01 GiB of 50.08 GiB available on linux (linux debian x86_64 - linux)
12:50:01:ObjectDetectionYOLOv5Net: Installing psmisc...
12:50:01:ObjectDetectionYOLOv5Net: E: Could not get lock /var/lib/dpkg/lock. It is held by process 12165 (dpkg)
12:50:01:ObjectDetectionYOLOv5Net: E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
12:50:01:ObjectDetectionYOLOv5Net: Installing xz-utils...
12:50:01:ObjectDetectionYOLOv5Net: E: Could not get lock /var/lib/dpkg/lock. It is held by process 12165 (dpkg)
12:50:01:ObjectDetectionYOLOv5Net: E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
12:50:01:ObjectDetectionYOLOv5Net: General CodeProject.AI setup                                         
12:50:01:ObjectDetectionYOLOv5Net: Setting permissions on runtimes folder...done
12:50:01:ObjectDetectionYOLOv5Net: Setting permissions on general downloads folder...done
12:50:01:ObjectDetectionYOLOv5Net: Setting permissions on module asset downloads folder...done
12:50:01:ObjectDetectionYOLOv5Net: Setting permissions on modules folder...done
12:50:01:ObjectDetectionYOLOv5Net: Setting permissions on models folder...done
12:50:01:ObjectDetectionYOLOv5Net: Setting permissions on persisted data folder...done
12:50:01:ObjectDetectionYOLOv5Net: GPU support                                                           
12:50:01:ObjectDetectionYOLOv5Net: Installing NVIDIA keyring
12:50:01:ObjectDetectionYOLOv5Net: E: Could not get lock /var/lib/apt/lists/lock. It is held by process 21003 (apt-get)
12:50:01:ObjectDetectionYOLOv5Net: E: Unable to lock directory /var/lib/apt/lists/
12:50:01:ObjectDetectionYOLOv5Net: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:01:ObjectDetectionYOLOv5Net: W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:01:ObjectDetectionYOLOv5Net: W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:01:ObjectDetectionYOLOv5Net: W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:01:ObjectDetectionYOLOv5Net: W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:01:ObjectDetectionYOLOv5Net: W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:01:ObjectDetectionYOLOv5Net: W: Target Translations (contrib/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:01:ObjectDetectionYOLOv5Net: W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Translations (contrib/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Translations (contrib/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: dpkg: error: dpkg database lock was locked by another process with pid 12165
12:50:02:ObjectDetectionYOLOv5Net: Note: removing the lock file is always wrong, can damage the locked area
12:50:02:ObjectDetectionYOLOv5Net: and the entire system. See .
12:50:03:ObjectDetectionYOLOv5Net:   Installing CUDA toolkit
12:50:03:ObjectDetectionYOLOv5Net: Found 'deb http://deb.debian.org/debian bookworm main'. Replacing it with 'deb http://deb.debian.org/debian bookworm main contrib non-free'...
12:50:03:ObjectDetectionYOLOv5Net: Found 'deb-src http://deb.debian.org/debian bookworm main'. Replacing it with 'deb-src http://deb.debian.org/debian bookworm main contrib non-free'...
12:50:03:ObjectDetectionYOLOv5Net:  Installing cuda kit
12:50:04:ObjectDetectionYOLOv5Net:  CUDA (NVIDIA) Present: Yes (CUDA 12.8, cuDNN 9.12.0)
12:50:04:ObjectDetectionYOLOv5Net: ROCm (AMD) Present:    (attempt to install rocminfo... ) No
12:50:04:ObjectDetectionYOLOv5Net: MPS (Apple) Present:   No
12:50:04:ObjectDetectionYOLOv5Net: Reading module settings.......done
12:50:04:ObjectDetectionYOLOv5Net: Processing module ObjectDetectionYOLOv5Net 1.14.0 (Internal)         
12:50:04:ObjectDetectionYOLOv5Net: Pulling pre-build binary ObjectDetectionYOLOv5Net-CUDA-1.14.0.zip...
12:50:20:ObjectDetectionYOLOv5Net: Downloading ObjectDetectionYOLOv5Net-CUDA-1.14.0.zip...Expanding... done.
12:50:20:ObjectDetectionYOLOv5Net: Moving contents of ObjectDetectionYOLOv5Net-CUDA-1.14.0.zip to bin...done.
12:50:24:ObjectDetectionYOLOv5Net: Downloading YOLO ONNX models...Expanding... done.
12:50:24:ObjectDetectionYOLOv5Net: Moving contents of yolonet-models.zip to assets...done.
12:50:27:ObjectDetectionYOLOv5Net: Downloading Custom YOLO ONNX models...Expanding... done.
12:50:27:ObjectDetectionYOLOv5Net: Moving contents of yolonet-custom-models.zip to custom-models...done.
12:50:27:ObjectDetectionYOLOv5Net: Scanning modulesettings for downloadable models...No models specified
12:50:27:ObjectDetectionYOLOv5Net: /usr/bin/codeproject.ai-server-2.9.5/setup.sh: line 387: 21930 Segmentation fault      dotnet "${exePath}" --selftest > /dev/null
12:50:27:ObjectDetectionYOLOv5Net: Self test: Self-test failed
12:50:27:ObjectDetectionYOLOv5Net: Module setup time 00:00:23
12:50:27:ObjectDetectionYOLOv5Net: Install failed: Self-test failed
12:50:27:ObjectDetectionYOLOv5Net:                 Setup complete                                       
12:50:27:ObjectDetectionYOLOv5Net: Total setup time 00:00:26
12:50:27:ObjectDetectionYOLOv5Net: SETUP FAILED:
12:50:27:ObjectDetectionYOLOv5Net:  - [Int: ObjectDetectionYOLOv5Net] Self-test failed
12:50:27:Module ObjectDetectionYOLOv5Net installed successfully.
12:50:27:Module ObjectDetectionYOLOv5Net not configured to AutoStart.
12:50:27:Installer exited with code 1
12:50:27:Installing initial module ObjectDetectionYOLOv5-6.2.
12:50:27:Preparing to install module 'ObjectDetectionYOLOv5-6.2'
12:50:27:Downloading module 'ObjectDetectionYOLOv5-6.2'
12:50:27:Installing module 'ObjectDetectionYOLOv5-6.2'
12:50:27:Installer script at '/usr/bin/codeproject.ai-server-2.9.5/setup.sh'
12:50:27:ObjectDetectionYOLOv5-6.2: Setting verbosity to quiet
12:50:27:ObjectDetectionYOLOv5-6.2: (No schemas means: we can't detect if you're in light or dark mode)
12:50:27:ObjectDetectionYOLOv5-6.2:              Installing CodeProject.AI Analysis Module               
12:50:27:ObjectDetectionYOLOv5-6.2: ======================================================================
12:50:27:ObjectDetectionYOLOv5-6.2:                    CodeProject.AI Installer                           
12:50:27:ObjectDetectionYOLOv5-6.2: ======================================================================
12:50:27:ObjectDetectionYOLOv5-6.2: 24.03 GiB of 50.08 GiB available on linux (linux debian x86_64 - linux)
12:50:27:ObjectDetectionYOLOv5-6.2: Installing psmisc...
12:50:27:ObjectDetectionYOLOv5-6.2: E: Type 'contrib' is not known on line 8 in source list /etc/apt/sources.list
12:50:27:ObjectDetectionYOLOv5-6.2: E: The list of sources could not be read.
12:50:28:ObjectDetectionYOLOv5-6.2: E: Type 'contrib' is not known on line 8 in source list /etc/apt/sources.list
12:50:28:ObjectDetectionYOLOv5-6.2: E: The list of sources could not be read.
12:50:28:ObjectDetectionYOLOv5-6.2: Installing xz-utils...
12:50:28:ObjectDetectionYOLOv5-6.2: E: Type 'contrib' is not known on line 8 in source list /etc/apt/sources.list
12:50:28:ObjectDetectionYOLOv5-6.2: E: The list of sources could not be read.
12:50:28:ObjectDetectionYOLOv5-6.2: E: Type 'contrib' is not known on line 8 in source list /etc/apt/sources.list
12:50:28:ObjectDetectionYOLOv5-6.2: E: The list of sources could not be read.
12:50:28:ObjectDetectionYOLOv5-6.2: General CodeProject.AI setup                                         
12:50:28:ObjectDetectionYOLOv5-6.2: Setting permissions on runtimes folder...done
12:50:28:ObjectDetectionYOLOv5-6.2: Setting permissions on general downloads folder...done
12:50:28:ObjectDetectionYOLOv5-6.2: Setting permissions on module asset downloads folder...done
12:50:28:ObjectDetectionYOLOv5-6.2: Setting permissions on modules folder...done
12:50:28:ObjectDetectionYOLOv5-6.2: Setting permissions on models folder...done
12:50:28:ObjectDetectionYOLOv5-6.2: Setting permissions on persisted data folder...done
12:50:28:ObjectDetectionYOLOv5-6.2: GPU support                                                           
12:50:28:ObjectDetectionYOLOv5-6.2: Installing NVIDIA keyring
12:50:29:ObjectDetectionYOLOv5-6.2:   Installing CUDA toolkit
12:50:29:ObjectDetectionYOLOv5-6.2: Found 'deb http://deb.debian.org/debian bookworm main'. Replacing it with 'deb http://deb.debian.org/debian bookworm main contrib non-free'...
12:50:29:ObjectDetectionYOLOv5-6.2: 'deb-src http://deb.debian.org/debian bookworm main' not found. Adding 'deb-src http://deb.debian.org/debian bookworm main contrib non-free' to sources.list...
12:50:30:ObjectDetectionYOLOv5-6.2:  Installing cuda kit
12:50:30:ObjectDetectionYOLOv5-6.2:  CUDA (NVIDIA) Present: Yes (CUDA 12.8, cuDNN 9.12.0)
12:50:30:ObjectDetectionYOLOv5-6.2: ROCm (AMD) Present:    (attempt to install rocminfo... ) No
12:50:30:ObjectDetectionYOLOv5-6.2: MPS (Apple) Present:   No
12:50:31:ObjectDetectionYOLOv5-6.2: Reading module settings.......done
12:50:31:ObjectDetectionYOLOv5-6.2: Processing module ObjectDetectionYOLOv5-6.2 1.10.0 (Internal)         
12:50:31:ObjectDetectionYOLOv5-6.2: Installing Python 3.8
12:50:32:ObjectDetectionYOLOv5-6.2: Searching for build-essential make...installing...   done
12:50:33:ObjectDetectionYOLOv5-6.2: Searching for openssl-dev libssl-dev libncurses5-dev l...installing...   done
12:50:33:ObjectDetectionYOLOv5-6.2: Installing Python needs to be done manually
12:50:33:ObjectDetectionYOLOv5-6.2: Please run this command in a terminal:
12:50:33:ObjectDetectionYOLOv5-6.2:    cd /usr/bin/codeproject.ai-server-2.9.5/modules/ObjectDetectionYOLOv5-6.2 && sudo bash ../../setup.sh
12:50:33:ObjectDetectionYOLOv5-6.2: then restart CodeProject.AI Server
12:50:33:Module ObjectDetectionYOLOv5-6.2 installed successfully.
12:50:33:Installer exited with code 0
12:50:33:
12:50:33:Module 'Object Detection (YOLOv5 6.2)' 1.10.0 (ID: ObjectDetectionYOLOv5-6.2)
12:50:33:Valid:            True
12:50:33:Module Path:      <root>/modules/ObjectDetectionYOLOv5-6.2
12:50:33:Module Location:  Internal
12:50:33:AutoStart:        True
12:50:33:Queue:            objectdetection_queue
12:50:33:Runtime:          python3.8
12:50:33:Runtime Location: Shared
12:50:33:FilePath:         detect_adapter.py
12:50:33:Start pause:      1 sec
12:50:33:Parallelism:      0
12:50:33:LogVerbosity:
12:50:33:Platforms:        all,!raspberrypi,!jetson
12:50:33:GPU Libraries:    installed if available
12:50:33:GPU:              use if supported
12:50:33:Accelerator:
12:50:33:Half Precision:   enable
12:50:33:Environment Variables
12:50:33:APPDIR             = <root>/modules/ObjectDetectionYOLOv5-6.2
12:50:33:CUSTOM_MODELS_DIR  = <root>/modules/ObjectDetectionYOLOv5-6.2/custom-models
12:50:33:MODELS_DIR         = <root>/modules/ObjectDetectionYOLOv5-6.2/assets
12:50:33:MODEL_SIZE         = Medium
12:50:33:USE_CUDA           = True
12:50:33:YOLOv5_AUTOINSTALL = false
12:50:33:YOLOv5_VERBOSE     = false
12:50:33:
12:50:33:Running module using: /usr/bin/codeproject.ai-server-2.9.5/runtimes/bin/debian gnu/linux/python38/venv/bin/python3
12:50:33:Starting /usr.../debian gnu/linux/python38/venv/bin/python3 "/usr...jectDetectionYOLOv5-6.2/detect_adapter.py"
12:50:33:
12:50:33:Attempting to start ObjectDetectionYOLOv5-6.2 with /usr/bin/codeproject.ai-server-2.9.5/runtimes/bin/debian gnu/linux/python38/venv/bin/python3 "/usr/bin/codeproject.ai-server-2.9.5/modules/ObjectDetectionYOLOv5-6.2/detect_adapter.py"
12:50:33:Error trying to start Object Detection (YOLOv5 6.2) (detect_adapter.py)
12:50:33:Error is: An error occurred trying to start process '/usr/bin/codeproject.ai-server-2.9.5/runtimes/bin/debian gnu/linux/python38/venv/bin/python3' with working directory '/usr/bin/codeproject.ai-server-2.9.5/modules/ObjectDetectionYOLOv5-6.2'. No such file or directory
12:50:33:   at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at CodeProject.AI.Server.Modules.ModuleProcessServices.StartProcess(ModuleConfig module, String installSummary)
12:50:33:Module ObjectDetectionYOLOv5-6.2 started successfully.
12:50:33:Please check the CodeProject.AI installation completed successfully
 
Update, ignored the errors and followed the steps to finalize the installation and after a reboot i went into CPAI web interface and uninstalled both Object Detection (YOLOv5 6.2) and Face Processing
but the issues that i have now is that i cant seem to enable the GPU when ever i click on enbale GPU it just restart the Object Detection (YOLOv5 .NET) and still uses the CPU. the other issue is that i have added the ip of the CPAI server under BI AI and even restarted but VM but BI still doesnt send anything to CPAI
Code:
Server version:   2.9.5
System:           Linux
Operating System: Linux (Debian GNU/Linux 12 bookworm)
CPUs:             Intel(R) Core(TM) i5-14500 (Intel)
                  1 CPU x 14 cores. 20 logical processors (x64)
GPU (Primary):    Quadro P620 (2 GiB) (NVIDIA)
                  Driver: 570.181, CUDA: 12.8 (up to: 12.8), Compute: 6.1, cuDNN: 9.12.0
System RAM:       8 GiB
Platform:         Linux
BuildConfig:      Release
Execution Env:    Native
Runtime Env:      Production
Runtimes installed:
  .NET runtime:     9.0.8
  .NET SDK:         9.0.304
  Default Python:   3.8.20
  Go:               Not found
  NodeJS:           Not found
  Rust:             Not found
Video adapter info:
System GPU info:
  GPU 3D Usage       0%
  GPU RAM Usage      55 MiB
Global Environment variables:
  CPAI_APPROOTPATH = <root>
  CPAI_PORT        = 32168

and still sees these errors:

Code:
16:40:31:ObjectDetectionYOLOv5Net.dll: 2025-08-12 14:40:31.594983729 [E:onnxruntime:CSharpOnnxRuntime, env.cc:234 ThreadMain] pthread_setaffinity_np failed for thread: 1743, index: 3, mask: {3, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.[m
16:40:31:ObjectDetectionYOLOv5Net.dll: 2025-08-12 14:40:31.595042516 [E:onnxruntime:CSharpOnnxRuntime, env.cc:234 ThreadMain] pthread_setaffinity_np failed for thread: 1742, index: 2, mask: {2, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.[m
16:40:31:ObjectDetectionYOLOv5Net.dll: 2025-08-12 14:40:31.596836014 [E:onnxruntime:CSharpOnnxRuntime, env.cc:234 ThreadMain] pthread_setaffinity_np failed for thread: 1740, index: 0, mask: {0, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.[m
16:40:31:ObjectDetectionYOLOv5Net.dll: 2025-08-12 14:40:31.594980201 [E:onnxruntime:CSharpOnnxRuntime, env.cc:234 ThreadMain] pthread_setaffinity_np failed for thread: 1741, index: 1, mask: {1, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.[m
16:40:31:ObjectDetectionYOLOv5Net.dll: fail: CodeProject.AI.Modules.ObjectDetection.YOLOv5.ObjectDetector[0]
16:40:31:ObjectDetectionYOLOv5Net.dll:       Unable to load the model with CUDA. Falling back to CPU.
16:40:31:ObjectDetectionYOLOv5Net.dll: 2025-08-12 14:40:31.732466434 [E:onnxruntime:CSharpOnnxRuntime, env.cc:234 ThreadMain] pthread_setaffinity_np failed for thread: 1746, index: 0, mask: {0, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.[m
16:40:31:ObjectDetectionYOLOv5Net.dll: 2025-08-12 14:40:31.732500930 [E:onnxruntime:CSharpOnnxRuntime, env.cc:234 ThreadMain] pthread_setaffinity_np failed for thread: 1747, index: 1, mask: {1, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.[m
16:40:31:ObjectDetectionYOLOv5Net.dll: 2025-08-12 14:40:31.732922600 [E:onnxruntime:CSharpOnnxRuntime, env.cc:234 ThreadMain] pthread_setaffinity_np failed for thread: 1748, index: 2, mask: {2, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.[m
16:40:31:ObjectDetectionYOLOv5Net.dll: 2025-08-12 14:40:31.734875677 [E:onnxruntime:CSharpOnnxRuntime, env.cc:234 ThreadMain] pthread_setaffinity_np failed for thread: 1749, index: 3, mask: {3, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.[m

Extra logs from the dashboard

Code:
Module 'Object Detection (YOLOv5 .NET)' 1.14.0 (ID: ObjectDetectionYOLOv5Net)
Valid:            True
Module Path:      <root>/modules/ObjectDetectionYOLOv5Net
Module Location:  Internal
AutoStart:        True
Queue:            objectdetection_queue
Runtime:          dotnet
Runtime Location: System
FilePath:         bin/ObjectDetectionYOLOv5Net.dll
Start pause:      1 sec
Parallelism:      0
LogVerbosity:     
Platforms:        all,!windows-arm64
GPU Libraries:    installed if available
GPU:              use if supported
Accelerator:     
Half Precision:   enable
Environment Variables
   CUSTOM_MODELS_DIR = <root>/modules/ObjectDetectionYOLOv5Net/custom-models
   MODELS_DIR        = <root>/modules/ObjectDetectionYOLOv5Net/assets
   MODEL_SIZE        = large
Status Data:  {
  "inferenceDevice": "CPU",
  "inferenceLibrary": "",
  "canUseGPU": true,
  "successfulInferences": 0,
  "failedInferences": 0,
  "numInferences": 0,
  "averageInferenceMs": 0,
  "Histogram": {},
  "NumItemsFound": 0
}
Started:      12 Aug 2025 2:40:38 PM Coordinated Universal Time
LastSeen:     12 Aug 2025 2:48:18 PM Coordinated Universal Time
Status:       Started
Requests:     0 (includes status calls)




Installation Log
2025-08-12 14:07:30: Setting verbosity to quiet
2025-08-12 14:07:30: (No schemas means: we can't detect if you're in light or dark mode)
2025-08-12 14:07:30:              Installing CodeProject.AI Analysis Module               
2025-08-12 14:07:30: ======================================================================
2025-08-12 14:07:30:                    CodeProject.AI Installer                           
2025-08-12 14:07:30: ======================================================================
2025-08-12 14:07:30: 27.07 GiB of 50.08 GiB available on linux (linux debian x86_64 - linux)
2025-08-12 14:07:30: Installing psmisc...
2025-08-12 14:07:30: E: Type 'contrib' is not known on line 8 in source list /etc/apt/sources.list
2025-08-12 14:07:30: E: The list of sources could not be read.
2025-08-12 14:07:30: E: Type 'contrib' is not known on line 8 in source list /etc/apt/sources.list
2025-08-12 14:07:30: E: The list of sources could not be read.
2025-08-12 14:07:30: Installing xz-utils...
2025-08-12 14:07:30: E: Type 'contrib' is not known on line 8 in source list /etc/apt/sources.list
2025-08-12 14:07:30: E: The list of sources could not be read.
2025-08-12 14:07:30: E: Type 'contrib' is not known on line 8 in source list /etc/apt/sources.list
2025-08-12 14:07:30: E: The list of sources could not be read.
2025-08-12 14:07:30: General CodeProject.AI setup                                         
2025-08-12 14:07:30: Setting permissions on runtimes folder...done
2025-08-12 14:07:30: Setting permissions on general downloads folder...done
2025-08-12 14:07:30: Setting permissions on module asset downloads folder...done
2025-08-12 14:07:30: Setting permissions on modules folder...done
2025-08-12 14:07:30: Setting permissions on models folder...done
2025-08-12 14:07:30: Setting permissions on persisted data folder...done
2025-08-12 14:07:30: GPU support                                                           
2025-08-12 14:07:30: Installing NVIDIA keyring
2025-08-12 14:07:31:   Installing CUDA toolkit
2025-08-12 14:07:31: Found 'deb http://deb.debian.org/debian bookworm main'. Replacing it with 'deb http://deb.debian.org/debian bookworm main contrib non-free'...
2025-08-12 14:07:31: Found 'deb-src http://deb.debian.org/debian bookworm main'. Replacing it with 'deb-src http://deb.debian.org/debian bookworm main contrib non-free'...
2025-08-12 14:07:31:  Installing cuda kit
2025-08-12 14:07:31:  CUDA (NVIDIA) Present: Yes (CUDA 12.8, cuDNN 9.12.0)
2025-08-12 14:07:32: ROCm (AMD) Present:    (attempt to install rocminfo... ) No
2025-08-12 14:07:32: MPS (Apple) Present:   No
2025-08-12 14:07:32: Reading module settings.......done
2025-08-12 14:07:32: Processing module ObjectDetectionYOLOv5Net 1.14.0 (Internal)         
2025-08-12 14:07:32: Pulling pre-build binary ObjectDetectionYOLOv5Net-CUDA-1.14.0.zip...
2025-08-12 14:07:49: Downloading ObjectDetectionYOLOv5Net-CUDA-1.14.0.zip...Expanding... done.
2025-08-12 14:07:49: Moving contents of ObjectDetectionYOLOv5Net-CUDA-1.14.0.zip to bin...done.
2025-08-12 14:07:54: Downloading YOLO ONNX models...Expanding... done.
2025-08-12 14:07:54: Moving contents of yolonet-models.zip to assets...done.
2025-08-12 14:07:56: Downloading Custom YOLO ONNX models...Expanding... done.
2025-08-12 14:07:56: Moving contents of yolonet-custom-models.zip to custom-models...done.
2025-08-12 14:07:57: Scanning modulesettings for downloadable models...No models specified
2025-08-12 14:07:57: /usr/bin/codeproject.ai-server-2.9.5/setup.sh: line 387:  3925 Segmentation fault      dotnet "${exePath}" --selftest > /dev/null
2025-08-12 14:07:57: Self test: Self-test failed
2025-08-12 14:07:57: Module setup time 00:00:25
2025-08-12 14:07:57: Install failed: Self-test failed
2025-08-12 14:07:57:                 Setup complete                                       
2025-08-12 14:07:57: Total setup time 00:00:27
2025-08-12 14:07:57: SETUP FAILED:
2025-08-12 14:07:57:  - [Int: ObjectDetectionYOLOv5Net] Self-test failed
 
im slowly migrating all my servers/systems from physical pcs to virtual using proxmox (version 9). and managed to run BI in a VM windows but the issue that i have is with CPAI.
im trying to install CPAI in a LXC container running debian 12 using following guide: CodeProject.AI on Ubuntu.
But no matter what i do i keep getting these error when running pushd "/usr/bin/codeproject.ai-server-2.9.5/server" && bash ../setup.sh && popd
Bash:
12:29:57:System: Linux
12:29:57:Operating System: Linux (Debian GNU/Linux 12 bookworm)
12:29:57:CPUs: Intel(R) Core(TM) i5-14500 (Intel)
12:29:57: 1 CPU x 14 cores. 20 logical processors (x64)
12:29:57:System RAM: 8 GiB
12:29:57:Platform: Linux
12:29:57:BuildConfig: Release
12:29:57:Execution Env: Native
12:29:57:Runtime Env: Production
12:29:57:Runtimes installed:
12:29:57: .NET runtime: 9.0.8
12:29:57: .NET SDK: 9.0.304
12:29:57: Default Python: 3.11.2
12:29:57: Go: Not found
12:29:57: NodeJS: Not found
12:29:57: Rust: Not found
12:29:57:App DataDir: /etc/codeproject/ai
12:29:57:Video adapter info:
12:29:57:STARTING CODEPROJECT.AI SERVER
12:29:57:RUNTIMES_PATH = /usr/bin/codeproject.ai-server-2.9.5/runtimes
12:29:57:PREINSTALLED_MODULES_PATH = /usr/bin/codeproject.ai-server-2.9.5/preinstalled-modules
12:29:57:DEMO_MODULES_PATH = /usr/bin/codeproject.ai-server-2.9.5/src/demos/modules
12:29:57:EXTERNAL_MODULES_PATH = /usr/bin/CodeProject.AI-Modules
12:29:57:MODULES_PATH = /usr/bin/codeproject.ai-server-2.9.5/modules
12:29:57:PYTHON_PATH = /bin/debian gnu/linux/%PYTHON_NAME%/venv/bin/python3
12:29:57:Data Dir = /etc/codeproject/ai
12:29:57:Server version: 2.9.5
12:29:57:ModuleRunner Start
12:29:57:No record of a previous module installation found. Running install
12:29:57:Starting Background AI Modules
12:30:00:Setting up initial modules. Please be patient...
12:30:00:Installing initial module FaceProcessing.
12:30:00:Preparing to install module 'FaceProcessing'
12:30:01:Downloading module 'FaceProcessing'
12:30:01:Installing module 'FaceProcessing'
12:30:01:Installer script at '/usr/bin/codeproject.ai-server-2.9.5/setup.sh'
12:30:01:FaceProcessing: Setting verbosity to quiet
12:30:01:FaceProcessing: (No schemas means: we can't detect if you're in light or dark mode)
12:30:01:FaceProcessing: Installing CodeProject.AI Analysis Module 
12:30:01:FaceProcessing: ======================================================================
12:30:01:FaceProcessing: CodeProject.AI Installer 
12:30:01:FaceProcessing: ======================================================================
12:30:01:FaceProcessing: 45.00 GiB of 50.08 GiB available on linux (linux debian x86_64 - linux)
12:30:01:FaceProcessing: Installing psmisc...
12:30:01:FaceProcessing: Installing xz-utils...
12:30:01:FaceProcessing: Installing jq...
12:30:01:FaceProcessing: E: Could not get lock /var/lib/apt/lists/lock. It is held by process 534 (apt-get)
12:30:01:FaceProcessing: E: Unable to lock directory /var/lib/apt/lists/
12:30:02:FaceProcessing: E: Could not get lock /var/lib/apt/lists/lock. It is held by process 534 (apt-get)
12:30:02:FaceProcessing: E: Unable to lock directory /var/lib/apt/lists/
12:30:02:Server: This is the latest version
12:30:02:Current Version is 2.9.5
12:30:15:FaceProcessing: General CodeProject.AI setup 
12:30:15:FaceProcessing: Setting permissions on runtimes folder...done
12:30:15:FaceProcessing: Setting permissions on general downloads folder...done
12:30:15:FaceProcessing: Creating module asset downloads folder...done
12:30:15:FaceProcessing: Setting permissions on module asset downloads folder...done
12:30:15:FaceProcessing: Setting permissions on modules folder...done
12:30:15:FaceProcessing: Setting permissions on models folder...done
12:30:15:FaceProcessing: Setting permissions on persisted data folder...done
12:30:15:FaceProcessing: GPU support 
12:30:15:FaceProcessing: Installing NVIDIA keyring
12:30:17:FaceProcessing: Installing cuDNN
12:31:25:FaceProcessing: Installing CUDA toolkit
12:31:25:FaceProcessing: 'deb http://deb.debian.org/debian bookworm main' not found. Adding 'deb http://deb.debian.org/debian bookworm main contrib non-free' to sources.list...
12:31:25:FaceProcessing: 'deb-src http://deb.debian.org/debian bookworm main' not found. Adding 'deb-src http://deb.debian.org/debian bookworm main contrib non-free' to sources.list...
12:31:26:FaceProcessing: Installing cuda kit
12:50:01:Module FaceProcessing installed successfully.
12:50:01:Unable to install FaceProcessing: Timed out attempting to install Module 'FaceProcessing' (A task was canceled.)
12:50:01:Installing initial module ObjectDetectionYOLOv5Net.
12:50:01:Preparing to install module 'ObjectDetectionYOLOv5Net'
12:50:01:Downloading module 'ObjectDetectionYOLOv5Net'
12:50:01:FaceProcessing: Searching for nvidia-cuda-toolkit...installing...
12:50:01:Running module using: /usr/bin/codeproject.ai-server-2.9.5/runtimes/bin/debian gnu/linux/python38/venv/bin/python3
12:50:01:
12:50:01:Module 'Face Processing' 1.12.3 (ID: FaceProcessing)
12:50:01:Valid: True
12:50:01:Module Path: /modules/FaceProcessing
12:50:01:Module Location: Internal
12:50:01:AutoStart: True
12:50:01:Queue: faceprocessing_queue
12:50:01:Runtime: python3.8
12:50:01:Runtime Location: Shared
12:50:01:FilePath: intelligencelayer/face.py
12:50:01:Start pause: 3 sec
12:50:01:Parallelism: 0
12:50:01:LogVerbosity:
12:50:01:Platforms: all,!jetson
12:50:01:GPU Libraries: installed if available
12:50:01:GPU: use if supported
12:50:01:Accelerator:
12:50:01:Half Precision: enable
12:50:01:Environment Variables
12:50:01:APPDIR = /modules/FaceProcessing/intelligencelayer
12:50:01:Starting /usr.../debian gnu/linux/python38/venv/bin/python3 "/usr.../FaceProcessing/intelligencelayer/face.py"
12:50:01:
12:50:01:Attempting to start FaceProcessing with /usr/bin/codeproject.ai-server-2.9.5/runtimes/bin/debian gnu/linux/python38/venv/bin/python3 "/usr/bin/codeproject.ai-server-2.9.5/modules/FaceProcessing/intelligencelayer/face.py"
12:50:01:DATA_DIR = /etc/codeproject/ai
12:50:01:MODE = MEDIUM
12:50:01:MODELS_DIR = /modules/FaceProcessing/assets
12:50:01:PROFILE = desktop_gpu
12:50:01:USE_CUDA = True
12:50:01:YOLOv5_AUTOINSTALL = false
12:50:01:YOLOv5_VERBOSE = false
12:50:01:
12:50:01:Error trying to start Face Processing (intelligencelayer/face.py)
12:50:01:Error is: An error occurred trying to start process '/usr/bin/codeproject.ai-server-2.9.5/runtimes/bin/debian gnu/linux/python38/venv/bin/python3' with working directory '/usr/bin/codeproject.ai-server-2.9.5/modules/FaceProcessing'. No such file or directory
12:50:01: at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at CodeProject.AI.Server.Modules.ModuleProcessServices.StartProcess(ModuleConfig module, String installSummary)
12:50:01:Please check the CodeProject.AI installation completed successfully
12:50:01:Module FaceProcessing started successfully.
12:50:01:Installing module 'ObjectDetectionYOLOv5Net'
12:50:01:Installer script at '/usr/bin/codeproject.ai-server-2.9.5/setup.sh'
12:50:01:ObjectDetectionYOLOv5Net: Setting verbosity to quiet
12:50:01:ObjectDetectionYOLOv5Net: (No schemas means: we can't detect if you're in light or dark mode)
12:50:01:ObjectDetectionYOLOv5Net: Installing CodeProject.AI Analysis Module 
12:50:01:ObjectDetectionYOLOv5Net: ======================================================================
12:50:01:ObjectDetectionYOLOv5Net: CodeProject.AI Installer 
12:50:01:ObjectDetectionYOLOv5Net: ======================================================================
12:50:01:ObjectDetectionYOLOv5Net: 27.01 GiB of 50.08 GiB available on linux (linux debian x86_64 - linux)
12:50:01:ObjectDetectionYOLOv5Net: Installing psmisc...
12:50:01:ObjectDetectionYOLOv5Net: E: Could not get lock /var/lib/dpkg/lock. It is held by process 12165 (dpkg)
12:50:01:ObjectDetectionYOLOv5Net: E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
12:50:01:ObjectDetectionYOLOv5Net: Installing xz-utils...
12:50:01:ObjectDetectionYOLOv5Net: E: Could not get lock /var/lib/dpkg/lock. It is held by process 12165 (dpkg)
12:50:01:ObjectDetectionYOLOv5Net: E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
12:50:01:ObjectDetectionYOLOv5Net: General CodeProject.AI setup 
12:50:01:ObjectDetectionYOLOv5Net: Setting permissions on runtimes folder...done
12:50:01:ObjectDetectionYOLOv5Net: Setting permissions on general downloads folder...done
12:50:01:ObjectDetectionYOLOv5Net: Setting permissions on module asset downloads folder...done
12:50:01:ObjectDetectionYOLOv5Net: Setting permissions on modules folder...done
12:50:01:ObjectDetectionYOLOv5Net: Setting permissions on models folder...done
12:50:01:ObjectDetectionYOLOv5Net: Setting permissions on persisted data folder...done
12:50:01:ObjectDetectionYOLOv5Net: GPU support 
12:50:01:ObjectDetectionYOLOv5Net: Installing NVIDIA keyring
12:50:01:ObjectDetectionYOLOv5Net: E: Could not get lock /var/lib/apt/lists/lock. It is held by process 21003 (apt-get)
12:50:01:ObjectDetectionYOLOv5Net: E: Unable to lock directory /var/lib/apt/lists/
12:50:01:ObjectDetectionYOLOv5Net: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:01:ObjectDetectionYOLOv5Net: W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:01:ObjectDetectionYOLOv5Net: W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:01:ObjectDetectionYOLOv5Net: W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:01:ObjectDetectionYOLOv5Net: W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:01:ObjectDetectionYOLOv5Net: W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:01:ObjectDetectionYOLOv5Net: W: Target Translations (contrib/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:01:ObjectDetectionYOLOv5Net: W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Translations (contrib/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Translations (contrib/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:7
12:50:02:ObjectDetectionYOLOv5Net: dpkg: error: dpkg database lock was locked by another process with pid 12165
12:50:02:ObjectDetectionYOLOv5Net: Note: removing the lock file is always wrong, can damage the locked area
12:50:02:ObjectDetectionYOLOv5Net: and the entire system. See .
12:50:03:ObjectDetectionYOLOv5Net: Installing CUDA toolkit
12:50:03:ObjectDetectionYOLOv5Net: Found 'deb http://deb.debian.org/debian bookworm main'. Replacing it with 'deb http://deb.debian.org/debian bookworm main contrib non-free'...
12:50:03:ObjectDetectionYOLOv5Net: Found 'deb-src http://deb.debian.org/debian bookworm main'. Replacing it with 'deb-src http://deb.debian.org/debian bookworm main contrib non-free'...
12:50:03:ObjectDetectionYOLOv5Net: Installing cuda kit
12:50:04:ObjectDetectionYOLOv5Net: CUDA (NVIDIA) Present: Yes (CUDA 12.8, cuDNN 9.12.0)
12:50:04:ObjectDetectionYOLOv5Net: ROCm (AMD) Present: (attempt to install rocminfo... ) No
12:50:04:ObjectDetectionYOLOv5Net: MPS (Apple) Present: No
12:50:04:ObjectDetectionYOLOv5Net: Reading module settings.......done
12:50:04:ObjectDetectionYOLOv5Net: Processing module ObjectDetectionYOLOv5Net 1.14.0 (Internal) 
12:50:04:ObjectDetectionYOLOv5Net: Pulling pre-build binary ObjectDetectionYOLOv5Net-CUDA-1.14.0.zip...
12:50:20:ObjectDetectionYOLOv5Net: Downloading ObjectDetectionYOLOv5Net-CUDA-1.14.0.zip...Expanding... done.
12:50:20:ObjectDetectionYOLOv5Net: Moving contents of ObjectDetectionYOLOv5Net-CUDA-1.14.0.zip to bin...done.
12:50:24:ObjectDetectionYOLOv5Net: Downloading YOLO ONNX models...Expanding... done.
12:50:24:ObjectDetectionYOLOv5Net: Moving contents of yolonet-models.zip to assets...done.
12:50:27:ObjectDetectionYOLOv5Net: Downloading Custom YOLO ONNX models...Expanding... done.
12:50:27:ObjectDetectionYOLOv5Net: Moving contents of yolonet-custom-models.zip to custom-models...done.
12:50:27:ObjectDetectionYOLOv5Net: Scanning modulesettings for downloadable models...No models specified
12:50:27:ObjectDetectionYOLOv5Net: /usr/bin/codeproject.ai-server-2.9.5/setup.sh: line 387: 21930 Segmentation fault dotnet "${exePath}" --selftest > /dev/null
12:50:27:ObjectDetectionYOLOv5Net: Self test: Self-test failed
12:50:27:ObjectDetectionYOLOv5Net: Module setup time 00:00:23
12:50:27:ObjectDetectionYOLOv5Net: Install failed: Self-test failed
12:50:27:ObjectDetectionYOLOv5Net: Setup complete 
12:50:27:ObjectDetectionYOLOv5Net: Total setup time 00:00:26
12:50:27:ObjectDetectionYOLOv5Net: SETUP FAILED:
12:50:27:ObjectDetectionYOLOv5Net: - [Int: ObjectDetectionYOLOv5Net] Self-test failed
12:50:27:Module ObjectDetectionYOLOv5Net installed successfully.
12:50:27:Module ObjectDetectionYOLOv5Net not configured to AutoStart.
12:50:27:Installer exited with code 1
12:50:27:Installing initial module ObjectDetectionYOLOv5-6.2.
12:50:27:Preparing to install module 'ObjectDetectionYOLOv5-6.2'
12:50:27:Downloading module 'ObjectDetectionYOLOv5-6.2'
12:50:27:Installing module 'ObjectDetectionYOLOv5-6.2'
12:50:27:Installer script at '/usr/bin/codeproject.ai-server-2.9.5/setup.sh'
12:50:27:ObjectDetectionYOLOv5-6.2: Setting verbosity to quiet
12:50:27:ObjectDetectionYOLOv5-6.2: (No schemas means: we can't detect if you're in light or dark mode)
12:50:27:ObjectDetectionYOLOv5-6.2: Installing CodeProject.AI Analysis Module 
12:50:27:ObjectDetectionYOLOv5-6.2: ======================================================================
12:50:27:ObjectDetectionYOLOv5-6.2: CodeProject.AI Installer 
12:50:27:ObjectDetectionYOLOv5-6.2: ======================================================================
12:50:27:ObjectDetectionYOLOv5-6.2: 24.03 GiB of 50.08 GiB available on linux (linux debian x86_64 - linux)
12:50:27:ObjectDetectionYOLOv5-6.2: Installing psmisc...
12:50:27:ObjectDetectionYOLOv5-6.2: E: Type 'contrib' is not known on line 8 in source list /etc/apt/sources.list
12:50:27:ObjectDetectionYOLOv5-6.2: E: The list of sources could not be read.
12:50:28:ObjectDetectionYOLOv5-6.2: E: Type 'contrib' is not known on line 8 in source list /etc/apt/sources.list
12:50:28:ObjectDetectionYOLOv5-6.2: E: The list of sources could not be read.
12:50:28:ObjectDetectionYOLOv5-6.2: Installing xz-utils...
12:50:28:ObjectDetectionYOLOv5-6.2: E: Type 'contrib' is not known on line 8 in source list /etc/apt/sources.list
12:50:28:ObjectDetectionYOLOv5-6.2: E: The list of sources could not be read.
12:50:28:ObjectDetectionYOLOv5-6.2: E: Type 'contrib' is not known on line 8 in source list /etc/apt/sources.list
12:50:28:ObjectDetectionYOLOv5-6.2: E: The list of sources could not be read.
12:50:28:ObjectDetectionYOLOv5-6.2: General CodeProject.AI setup 
12:50:28:ObjectDetectionYOLOv5-6.2: Setting permissions on runtimes folder...done
12:50:28:ObjectDetectionYOLOv5-6.2: Setting permissions on general downloads folder...done
12:50:28:ObjectDetectionYOLOv5-6.2: Setting permissions on module asset downloads folder...done
12:50:28:ObjectDetectionYOLOv5-6.2: Setting permissions on modules folder...done
12:50:28:ObjectDetectionYOLOv5-6.2: Setting permissions on models folder...done
12:50:28:ObjectDetectionYOLOv5-6.2: Setting permissions on persisted data folder...done
12:50:28:ObjectDetectionYOLOv5-6.2: GPU support 
12:50:28:ObjectDetectionYOLOv5-6.2: Installing NVIDIA keyring
12:50:29:ObjectDetectionYOLOv5-6.2: Installing CUDA toolkit
12:50:29:ObjectDetectionYOLOv5-6.2: Found 'deb http://deb.debian.org/debian bookworm main'. Replacing it with 'deb http://deb.debian.org/debian bookworm main contrib non-free'...
12:50:29:ObjectDetectionYOLOv5-6.2: 'deb-src http://deb.debian.org/debian bookworm main' not found. Adding 'deb-src http://deb.debian.org/debian bookworm main contrib non-free' to sources.list...
12:50:30:ObjectDetectionYOLOv5-6.2: Installing cuda kit
12:50:30:ObjectDetectionYOLOv5-6.2: CUDA (NVIDIA) Present: Yes (CUDA 12.8, cuDNN 9.12.0)
12:50:30:ObjectDetectionYOLOv5-6.2: ROCm (AMD) Present: (attempt to install rocminfo... ) No
12:50:30:ObjectDetectionYOLOv5-6.2: MPS (Apple) Present: No
12:50:31:ObjectDetectionYOLOv5-6.2: Reading module settings.......done
12:50:31:ObjectDetectionYOLOv5-6.2: Processing module ObjectDetectionYOLOv5-6.2 1.10.0 (Internal) 
12:50:31:ObjectDetectionYOLOv5-6.2: Installing Python 3.8
12:50:32:ObjectDetectionYOLOv5-6.2: Searching for build-essential make...installing... done
12:50:33:ObjectDetectionYOLOv5-6.2: Searching for openssl-dev libssl-dev libncurses5-dev l...installing... done
12:50:33:ObjectDetectionYOLOv5-6.2: Installing Python needs to be done manually
12:50:33:ObjectDetectionYOLOv5-6.2: Please run this command in a terminal:
12:50:33:ObjectDetectionYOLOv5-6.2: cd /usr/bin/codeproject.ai-server-2.9.5/modules/ObjectDetectionYOLOv5-6.2 && sudo bash ../../setup.sh
12:50:33:ObjectDetectionYOLOv5-6.2: then restart CodeProject.AI Server
12:50:33:Module ObjectDetectionYOLOv5-6.2 installed successfully.
12:50:33:Installer exited with code 0
12:50:33:
12:50:33:Module 'Object Detection (YOLOv5 6.2)' 1.10.0 (ID: ObjectDetectionYOLOv5-6.2)
12:50:33:Valid: True
12:50:33:Module Path: /modules/ObjectDetectionYOLOv5-6.2
12:50:33:Module Location: Internal
12:50:33:AutoStart: True
12:50:33:Queue: objectdetection_queue
12:50:33:Runtime: python3.8
12:50:33:Runtime Location: Shared
12:50:33:FilePath: detect_adapter.py
12:50:33:Start pause: 1 sec
12:50:33:Parallelism: 0
12:50:33:LogVerbosity:
12:50:33:Platforms: all,!raspberrypi,!jetson
12:50:33:GPU Libraries: installed if available
12:50:33:GPU: use if supported
12:50:33:Accelerator:
12:50:33:Half Precision: enable
12:50:33:Environment Variables
12:50:33:APPDIR = /modules/ObjectDetectionYOLOv5-6.2
12:50:33:CUSTOM_MODELS_DIR = /modules/ObjectDetectionYOLOv5-6.2/custom-models
12:50:33:MODELS_DIR = /modules/ObjectDetectionYOLOv5-6.2/assets
12:50:33:MODEL_SIZE = Medium
12:50:33:USE_CUDA = True
12:50:33:YOLOv5_AUTOINSTALL = false
12:50:33:YOLOv5_VERBOSE = false
12:50:33:
12:50:33:Running module using: /usr/bin/codeproject.ai-server-2.9.5/runtimes/bin/debian gnu/linux/python38/venv/bin/python3
12:50:33:Starting /usr.../debian gnu/linux/python38/venv/bin/python3 "/usr...jectDetectionYOLOv5-6.2/detect_adapter.py"
12:50:33:
12:50:33:Attempting to start ObjectDetectionYOLOv5-6.2 with /usr/bin/codeproject.ai-server-2.9.5/runtimes/bin/debian gnu/linux/python38/venv/bin/python3 "/usr/bin/codeproject.ai-server-2.9.5/modules/ObjectDetectionYOLOv5-6.2/detect_adapter.py"
12:50:33:Error trying to start Object Detection (YOLOv5 6.2) (detect_adapter.py)
12:50:33:Error is: An error occurred trying to start process '/usr/bin/codeproject.ai-server-2.9.5/runtimes/bin/debian gnu/linux/python38/venv/bin/python3' with working directory '/usr/bin/codeproject.ai-server-2.9.5/modules/ObjectDetectionYOLOv5-6.2'. No such file or directory
12:50:33: at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at CodeProject.AI.Server.Modules.ModuleProcessServices.StartProcess(ModuleConfig module, String installSummary)
12:50:33:Module ObjectDetectionYOLOv5-6.2 started successfully.
12:50:33:Please check the CodeProject.AI installation completed successfully
"But no matter what i do i keep getting these error when running pushd "/usr/bin/codeproject.ai-server-2.9.5/server" && bash ../setup.sh && popd"

I ran into this installing on Ubuntu bare metal.
My solution was to run the script as root, not as sudo.
In other words do sudo -i, that will drop you to the root user, i.e. #, not ~.
I think it has to do with file system permissions.
It might have been to run the pushd command as root, not the whole install, I don't remember.
I've just been running CPAI on the Windows 11 Blue Iris machine since ver 2.9.5. It's running fine.
Frigate NVR, Nagios and my office apps all on Linux.
HTH

Sent from my iPlay_50 using Tapatalk
 
  • Like
Reactions: AlwaysSomething
"But no matter what i do i keep getting these error when running pushd "/usr/bin/codeproject.ai-server-2.9.5/server" && bash ../setup.sh && popd"

I ran into this installing on Ubuntu bare metal.
My solution was to run the script as root, not as sudo.
In other words do sudo -i, that will drop you to the root user, i.e. #, not ~.
I think it has to do with file system permissions.
It might have been to run the pushd command as root, not the whole install, I don't remember.
I've just been running CPAI on the Windows 11 Blue Iris machine since ver 2.9.5. It's running fine.
Frigate NVR, Nagios and my office apps all on Linux.
HTH

Sent from my iPlay_50 using Tapatalk
Thx you so much for the input, but the script and everything was done with the root user(which is the only account I have)