- 
                Notifications
    
You must be signed in to change notification settings  - Fork 202
 
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Area of Concern
- Server
 - Behaviour of one or more Modules: ALPR
 - Installer
 - Runtime [e.g. Python3.7, .NET]
 - Module packages [e.g. PyTorch)
 - Something else
 
Describe the bug
errors when installing ALPR module, error with paddleocr as when installing Docker and directly installer on Mac OS
docker run --name CodeProject.AI -d -p 32168:32168 codeproject/ai-server:arm64
Expected behavior
A clear and concise description of what you expected to happen.
Your System (please complete the following information):
- CodeProject.AI Server version: 2.9.5
 - OS: MacOS Seqoia
 - System RAM 32GB
 
Additional context
11:48:48:System:           Docker (50441d837620)
11:48:48:Operating System: Linux (Ubuntu 22.04 Jammy Jellyfish)
11:48:48:CPUs:             1 CPU. (Arm64)
11:48:48:System RAM:       8 GiB
11:48:48:Platform:         Linux-Arm64
11:48:48:BuildConfig:      Release
11:48:48:Execution Env:    Docker
11:48:48:Runtime Env:      Production
11:48:48:Runtimes installed:
11:48:48:  .NET runtime:     9.0.0
11:48:48:  .NET SDK:         Not found
11:48:48:  Default Python:   3.10.12
11:48:48:  Go:               Not found
11:48:48:  NodeJS:           Not found
11:48:48:  Rust:             Not found
11:48:48:App DataDir:      /etc/codeproject/ai
11:48:48:Video adapter info:
11:48:48:STARTING CODEPROJECT.AI SERVER
11:48:48:RUNTIMES_PATH             = /app/runtimes
11:48:48:PREINSTALLED_MODULES_PATH = /app/preinstalled-modules
11:48:48:DEMO_MODULES_PATH         = /app/src/demos/modules
11:48:48:EXTERNAL_MODULES_PATH     = /CodeProject.AI-Modules
11:48:48:MODULES_PATH              = /app/modules
11:48:48:PYTHON_PATH               = /bin/ubuntu/%PYTHON_NAME%/venv/bin/python3
11:48:48:Data Dir                  = /etc/codeproject/ai
11:48:48:Server version:   2.9.5
11:48:48:ModuleRunner Start
11:48:48:Overriding address(es) 'http://+:32168, http://+:5000'. Binding to endpoints defined via IConfiguration and/or UseKestrel() instead.
11:48:48:Starting Background AI Modules
11:48:51:Running module using: python3.8
11:48:51:
11:48:51:Attempting to start FaceProcessing with python3.8 "/app/preinstalled-modules/FaceProcessing/intelligencelayer/face.py"
11:48:51:
11:48:51:Module 'Face Processing' 1.12.3 (ID: FaceProcessing)
11:48:51:Valid:            True
11:48:51:Module Path:      <root>/preinstalled-modules/FaceProcessing
11:48:51:Module Location:  PreInstalled
11:48:51:AutoStart:        True
11:48:51:Queue:            faceprocessing_queue
11:48:51:Runtime:          python3.8
11:48:51:Runtime Location: System
11:48:51:Starting python3.8 "/app.../FaceProcessing/intelligencelayer/face.py"
11:48:51:FilePath:         intelligencelayer/face.py
11:48:51:Start pause:      3 sec
11:48:51:Parallelism:      0
11:48:51:LogVerbosity:
11:48:51:Platforms:        all,!jetson
11:48:51:GPU Libraries:    installed if available
11:48:51:GPU:              use if supported
11:48:51:Accelerator:
11:48:51:Half Precision:   enable
11:48:51:Environment Variables
11:48:51:APPDIR             = <root>/preinstalled-modules/FaceProcessing/intelligencelayer
11:48:51:DATA_DIR           = /etc/codeproject/ai
11:48:51:MODE               = MEDIUM
11:48:51:MODELS_DIR         = <root>/preinstalled-modules/FaceProcessing/assets
11:48:51:PROFILE            = desktop_gpu
11:48:51:USE_CUDA           = True
11:48:51:YOLOv5_AUTOINSTALL = false
11:48:51:YOLOv5_VERBOSE     = false
11:48:51:
11:48:51:Started Face Processing module
11:48:52:face.py: Vision AI services setup: Retrieving environment variables...
11:48:52:face.py: APPDIR:       /app/preinstalled-modules/FaceProcessing/intelligencelayer
11:48:52:face.py: PROFILE:      desktop_cpu
11:48:52:face.py: Running init for Face Processing
11:48:52:face.py: USE_CUDA:     False
11:48:52:face.py: DATA_DIR:     /etc/codeproject/ai
11:48:52:face.py: MODELS_DIR:   /app/preinstalled-modules/FaceProcessing/assets
11:48:52:face.py: MODE:         MEDIUM
11:48:53:Server: This is a new, unreleased version
11:48:53:Current Version is 2.9.5
11:48:54:
11:48:54:Module 'Object Detection (YOLOv5 6.2)' 1.10.0 (ID: ObjectDetectionYOLOv5-6.2)
11:48:54:Valid:            True
11:48:54:Module Path:      <root>/preinstalled-modules/ObjectDetectionYOLOv5-6.2
11:48:54:Module Location:  PreInstalled
11:48:54:AutoStart:        True
11:48:54:Queue:            objectdetection_queue
11:48:54:Runtime:          python3.8
11:48:54:Runtime Location: System
11:48:54:FilePath:         detect_adapter.py
11:48:54:Start pause:      1 sec
11:48:54:Parallelism:      0
11:48:54:LogVerbosity:
11:48:54:Platforms:        all,!raspberrypi,!jetson
11:48:54:GPU Libraries:    installed if available
11:48:54:GPU:              use if supported
11:48:54:Accelerator:
11:48:54:Half Precision:   enable
11:48:54:Environment Variables
11:48:54:APPDIR             = <root>/preinstalled-modules/ObjectDetectionYOLOv5-6.2
11:48:54:CUSTOM_MODELS_DIR  = <root>/preinstalled-modules/ObjectDetectionYOLOv5-6.2/custom-models
11:48:54:MODELS_DIR         = <root>/preinstalled-modules/ObjectDetectionYOLOv5-6.2/assets
11:48:54:MODEL_SIZE         = Medium
11:48:54:USE_CUDA           = True
11:48:54:YOLOv5_AUTOINSTALL = false
11:48:54:YOLOv5_VERBOSE     = false
11:48:54:
11:48:54:Running module using: python3.8
11:48:54:Starting python3.8 "/app...jectDetectionYOLOv5-6.2/detect_adapter.py"
11:48:54:
11:48:54:Attempting to start ObjectDetectionYOLOv5-6.2 with python3.8 "/app/preinstalled-modules/ObjectDetectionYOLOv5-6.2/detect_adapter.py"
11:48:54:Started Object Detection (YOLOv5 6.2) module
11:48:55:detect_adapter.py: Running init for Object Detection (YOLOv5 6.2)
11:48:55:detect_adapter.py: APPDIR:      /app/preinstalled-modules/ObjectDetectionYOLOv5-6.2
11:48:55:detect_adapter.py: MODEL_SIZE:  medium
11:48:55:detect_adapter.py: MODELS_DIR:  /app/preinstalled-modules/ObjectDetectionYOLOv5-6.2/assets
11:49:04:Preparing to install module 'ALPR'
11:49:04:Downloading module 'ALPR'
11:49:04:Installing module 'ALPR'
11:49:04:Installer script at '/app/setup.sh'
11:49:04:ALPR: Setting verbosity to info
11:49:04:ALPR: Hi Docker! We will disable shared python installs for downloaded modules
11:49:05:ALPR: (No schemas means: we can't detect if you're in light or dark mode)
11:49:05:ALPR:              Installing CodeProject.AI Analysis Module                
11:49:05:ALPR: ======================================================================
11:49:05:ALPR:                    CodeProject.AI Installer                           
11:49:05:ALPR: ======================================================================
11:49:05:ALPR: 234.02 GiB of 255.08 GiB available on Docker (linux ubuntu arm64 - linux-arm64)
11:49:05:ALPR: Installing xz-utils...
11:49:05:ALPR: E: Could not get lock /var/lib/apt/lists/lock. It is held by process 246 (apt-get)
11:49:05:ALPR: E: Unable to lock directory /var/lib/apt/lists/
11:49:05:ALPR: Reading package lists...
11:49:06:ALPR: Building dependency tree...
11:49:06:ALPR: Reading state information...
11:49:06:ALPR: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
11:49:06:ALPR: General CodeProject.AI setup                                          
11:49:06:ALPR: Setting permissions on runtimes folder...done
11:49:06:ALPR: Setting permissions on general downloads folder...done
11:49:06:ALPR: Creating module asset downloads folder...done
11:49:06:ALPR: Setting permissions on module asset downloads folder...done
11:49:06:ALPR: Setting permissions on modules folder...done
11:49:06:ALPR: Creating models folder...done
11:49:06:ALPR: Setting permissions on models folder...done
11:49:06:ALPR: Setting permissions on persisted data folder...done
11:49:06:ALPR: os, name, arch              = linux ubuntu (jammy) arm64
11:49:06:ALPR: systemName, platform        = Docker, linux-arm64
11:49:06:ALPR: edgeDevice                  = 
11:49:06:ALPR: SSH                         = false
11:49:06:ALPR: setupMode                   = SetupModule
11:49:06:ALPR: executionEnvironment        = Production
11:49:06:ALPR: rootDirPath                 = /app
11:49:06:ALPR: appRootDirPath              = /app
11:49:06:ALPR: setupScriptDirPath          = /app
11:49:06:ALPR: utilsScriptsDirPath         = /app/scripts
11:49:06:ALPR: runtimesDirPath             = /app/runtimes
11:49:06:ALPR: modulesDirPath              = /app/modules
11:49:06:ALPR: externalModulesDirPath      = /app/../CodeProject.AI-Modules
11:49:06:ALPR: downloadDirPath             = /app/downloads
11:49:06:ALPR: downloadModuleAssetsDirPath = /app/downloads/modules/assets
11:49:06:ALPR: assetStorageUrl             = https://codeproject-ai-bunny.b-cdn.net/server/assets/
11:49:06:ALPR: GPU support                                                           
11:49:06:ALPR: CUDA (NVIDIA) Present: No
11:49:07:ALPR: ROCm (AMD) Present:    (attempt to install rocminfo... ) No
11:49:07:ALPR: MPS (Apple) Present:   No
11:49:07:ALPR: Reading module settings.......done
11:49:07:ALPR: Processing module ALPR 3.3.3 (Internal)                               
11:49:07:ALPR: Variable Dump                                                         
11:49:07:ALPR: moduleName          = License Plate Reader
11:49:07:ALPR: moduleId            = ALPR
11:49:07:ALPR: moduleVersion       = 3.3.3
11:49:07:ALPR: runtime             = python3.8
11:49:07:ALPR: runtimeLocation     = Local
11:49:07:ALPR: installGPU          = false
11:49:07:ALPR: pythonVersion       = 3.8
11:49:07:ALPR: virtualEnvDirPath   = /app/modules/ALPR/bin/ubuntu/python38/venv
11:49:07:ALPR: venvPythonCmdPath   = /app/modules/ALPR/bin/ubuntu/python38/venv/bin/python3.8
11:49:07:ALPR: packagesDirPath     = /app/modules/ALPR/bin/ubuntu/python38/venv/lib/python3.8/site-packages/
11:49:07:ALPR: moduleStartFilePath = ALPR_adapter.py
11:49:07:ALPR: Installing Python 3.8
11:49:07:ALPR: Python 3.8 is already installed
11:49:07:ALPR: Ensuring PIP in base python install...Reading package lists...
11:49:07:ALPR: Building dependency tree...
11:49:07:ALPR: Reading state information...
11:49:11:ALPR: 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
11:49:11:ALPR: Need to get 193 kB of archives.
11:49:11:ALPR: After this operation, 0 B of additional disk space will be used.
11:49:11:ALPR: Get:1 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main arm64 python3.8-distutils all 3.8.20-1+jammy1 [193 kB]
11:49:13:ALPR: Fetched 193 kB in 5s (39.4 kB/s)
11:49:13:ALPR: (Reading database ... 
11:49:13:ALPR: (Reading database ... 5%
11:49:13:ALPR: (Reading database ... 10%
11:49:13:ALPR: (Reading database ... 15%
11:49:13:ALPR: (Reading database ... 20%
11:49:13:ALPR: (Reading database ... 25%
11:49:13:ALPR: (Reading database ... 30%
11:49:13:ALPR: (Reading database ... 35%
11:49:13:ALPR: (Reading database ... 40%
11:49:13:ALPR: (Reading database ... 45%
11:49:13:ALPR: (Reading database ... 50%
11:49:13:ALPR: (Reading database ... 55%
11:49:13:ALPR: (Reading database ... 60%
11:49:13:ALPR: (Reading database ... 65%
11:49:13:ALPR: (Reading database ... 70%
11:49:13:ALPR: (Reading database ... 75%
11:49:13:ALPR: (Reading database ... 80%
11:49:13:ALPR: (Reading database ... 85%
11:49:13:ALPR: (Reading database ... 90%
11:49:13:ALPR: (Reading database ... 95%
11:49:13:ALPR: (Reading database ... 100%
11:49:13:ALPR: (Reading database ... 21760 files and directories currently installed.)
11:49:13:ALPR: Preparing to unpack .../python3.8-distutils_3.8.20-1+jammy1_all.deb ...
11:49:13:ALPR: Unpacking python3.8-distutils (3.8.20-1+jammy1) over (3.8.20-1+jammy1) ...
11:49:13:ALPR: Setting up python3.8-distutils (3.8.20-1+jammy1) ...
11:49:13:ALPR: Looking in links: /tmp/tmpcgzu4i8r
11:49:13:ALPR: Requirement already satisfied: setuptools in /usr/local/lib/python3.8/dist-packages (75.3.0)
11:49:13:ALPR: Requirement already satisfied: pip in /usr/local/lib/python3.8/dist-packages (24.3.1)
11:49:14:ALPR: WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
11:49:14:ALPR: done
11:49:14:ALPR: Upgrading PIP in base python install...Requirement already satisfied: pip in /usr/local/lib/python3.8/dist-packages (24.3.1)
11:49:14:ALPR: WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
11:49:14:ALPR: done
11:49:14:ALPR: Installing Virtual Environment tools for Linux...
11:49:14:ALPR: Searching for installed dependencies:
11:49:16:ALPR:  -> python3-pip python3-setuptools python3.8-venv done
11:49:16:ALPR: All dependencies already installed.
11:49:17:ALPR: Creating Virtual Environment (Local)...done
11:49:17:ALPR: Checking for Python 3.8...(Found Python 3.8.20) All good
11:49:18:ALPR: Upgrading PIP in virtual environment... done
11:49:19:ALPR: Installing updated setuptools in venv... done
11:49:19:ALPR: Downloading ocr-en-pp_ocrv4-paddle.zip to /app/downloads/modules/assets/ALPR
11:49:19:ALPR: Extracting to paddleocr in this folder
11:49:21:ALPR: 2024-12-11 10:49:21 URL:https://codeproject-ai-bunny.b-cdn.net/server/assets/models/ocr-en-pp_ocrv4-paddle.zip [9963833/9963833] -> "/app/downloads/modules/assets/ALPR/ocr-en-pp_ocrv4-paddle.zip" [1]
11:49:21:ALPR: Downloading OCR models...Expanding...done.
11:49:21:ALPR: Moving contents of ocr-en-pp_ocrv4-paddle.zip to paddleocr...done.
11:49:21:ALPR: Installing Python packages for License Plate Reader
11:49:21:ALPR: Installing GPU-enabled libraries: No
11:49:21:ALPR: Ensuring PIP is installed and up to date...
11:49:21:ALPR: Searching for installed dependencies:
11:49:21:ALPR:  -> python3-pip done
11:49:21:ALPR: All dependencies already installed.
11:49:21:ALPR: Ensuring PIP compatibility ...
11:49:22:ALPR: Looking in links: /tmp/tmpyoaodew_
11:49:22:ALPR: Requirement already satisfied: setuptools in ./bin/ubuntu/python38/venv/lib/python3.8/site-packages (75.3.0)
11:49:22:ALPR: Requirement already satisfied: pip in ./bin/ubuntu/python38/venv/lib/python3.8/site-packages (24.3.1)
11:49:22:ALPR: Python packages will be specified by requirements.linux.arm64.txt
11:49:26:ALPR:   - Installing NumPy, a package for scientific computing...Checking ...Check done...Installing numpy==1.23.3... (✅ checked) done
11:49:34:Response timeout. Try increasing the timeout value
11:50:00:ALPR:   - Installing PaddelPaddle, the Deep Learning platform...Checking ...Check done...Installing paddlepaddle==2.6.0... (✅ checked) done
11:50:02:ALPR:   - Installing PaddleOCR, the OCR toolkit based on PaddlePaddle...Checking ...Check done...Installing paddleocr==2.7.0.3... (❌ failed check) done
11:50:04:ALPR:   - Installing imutils, the image utilities library...Checking ...Check done...Installing imutils... (✅ checked) done
11:50:18:ALPR:   - Installing OpenCV, the Computer Vision library for Python...Checking ...Check done...Installing opencv-python... (✅ checked) done
11:50:26:ALPR:   - Installing the CodeProject.AI SDK...Checking ...Check done...Installing CodeProject-AI-SDK... (✅ checked) done
11:50:26:ALPR: Scanning modulesettings for downloadable models...No models specified
11:50:26:ALPR: Executing post-install script for License Plate Reader
11:50:26:ALPR: Applying PaddleOCR patch
11:50:26:ALPR: cp: cannot create regular file '/app/modules/ALPR/bin/ubuntu/python38/venv/lib/python3.8/site-packages//paddleocr/.': No such file or directory
11:50:26:ALPR: Module setup time 00:01:19
11:50:26:ALPR: Install failed: Error running post-install script
11:50:26:ALPR:                 Setup complete                                        
11:50:26:ALPR: Total setup time 00:01:21
11:50:26:ALPR: SETUP FAILED:
11:50:26:ALPR:  - [Int: ALPR] Error running post-install script
11:50:26:Module ALPR installed successfully.
11:50:26:Installer exited with code 1
11:50:26:
11:50:26:Module 'License Plate Reader' 3.3.3 (ID: ALPR)
11:50:26:Valid:            True
11:50:26:Module Path:      <root>/modules/ALPR
11:50:26:Module Location:  Internal
11:50:26:AutoStart:        True
11:50:26:Queue:            alpr_queue
11:50:26:Runtime:          python3.8
11:50:26:Runtime Location: Local
11:50:26:FilePath:         ALPR_adapter.py
11:50:26:Start pause:      3 sec
11:50:26:Parallelism:      0
11:50:26:LogVerbosity:
11:50:26:Platforms:        all,!windows-arm64
11:50:26:GPU Libraries:    not installed
11:50:26:GPU:              do not use
11:50:26:Accelerator:
11:50:26:Half Precision:   enable
11:50:26:Environment Variables
11:50:26:AUTO_PLATE_ROTATE            = True
11:50:26:CROPPED_PLATE_DIR            = <root>/Server/wwwroot
11:50:26:MIN_COMPUTE_CAPABILITY       = 6
11:50:26:MIN_CUDNN_VERSION            = 7
11:50:26:OCR_OPTIMAL_CHARACTER_HEIGHT = 60
11:50:26:OCR_OPTIMAL_CHARACTER_WIDTH  = 30
11:50:26:OCR_OPTIMIZATION             = True
11:50:26:PLATE_CONFIDENCE             = 0.7
11:50:26:PLATE_RESCALE_FACTOR         = 2
11:50:26:PLATE_ROTATE_DEG             = 0
11:50:26:REMOVE_SPACES                = False
11:50:26:ROOT_PATH                    = <root>
11:50:26:SAVE_CROPPED_PLATE           = False
11:50:26:
11:50:26:Running module using: /app/modules/ALPR/bin/ubuntu/python38/venv/bin/python3
11:50:26:Starting /app...s/ALPR/bin/ubuntu/python38/venv/bin/python3 "/app/modules/ALPR/ALPR_adapter.py"
11:50:26:
11:50:26:Attempting to start ALPR with /app/modules/ALPR/bin/ubuntu/python38/venv/bin/python3 "/app/modules/ALPR/ALPR_adapter.py"
11:50:26:Started License Plate Reader module
11:50:26:ALPR_adapter.py: Traceback (most recent call last):
11:50:26:ALPR_adapter.py:   File "/app/modules/ALPR/ALPR_adapter.py", line 11, in 
11:50:26:ALPR_adapter.py:     from ALPR import init_detect_platenumber, detect_platenumber
11:50:26:ALPR_adapter.py:   File "/app/modules/ALPR/ALPR.py", line 17, in 
11:50:26:ALPR_adapter.py:     from paddleocr import PaddleOCR
11:50:26:ALPR_adapter.py: ImportError: cannot import name 'PaddleOCR' from 'paddleocr' (unknown location)
11:50:26:Module ALPR has shutdown
11:50:26:ALPR_adapter.py: has exited
11:50:29:Module ALPR started successfully.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working