inside the container


# Interactive ---->
apt install -y intel-mkl
# replace  libblas.so.3 liblapack.so.3 liblapack64.so.3 libblas64.so.3 with intel libs
# Interactive ----<


 
docker-php-ext-configure bz2
docker-php-ext-install bz2


apt install -y libavdevice-dev libavfilter-dev libavformat-dev
apt install -y libavcodec-dev libswresample-dev libswscale-dev
apt install -y libavutil-dev 

cd /usr/src/
git clone https://github.com/davisking/dlib.git
cd dlib/dlib
mkdir build
cd build
#cmake -DBUILD_SHARED_LIBS=ON ..
cmake -DUSE_AVX_INSTRUCTIONS=1 -DBUILD_SHARED_LIBS=ON ..
cmake --build .
make install

cd /usr/src/
git clone https://github.com/goodspb/pdlib.git
cd pdlib
phpize
./configure
#./configure --enable-debug
# you may need to indicate the dlib install location
# PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --enable-debug
ls -la /usr/local/lib/php/extensions/no-debug-non-zts-20230831/
make
make install

echo '[pdlib]' >  /usr/local/etc/php/conf.d/docker-php-ext-pdlib.ini
echo "extension=pdlib.so" >>  /usr/local/etc/php/conf.d/docker-php-ext-pdlib.ini

cd /var/www/html/ 

on host system

systemctl restart cloud-server

start the job

/usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=5G ./occ face:background_job"



see if its works

Current status

Analyzing images - 41296 images detected - 41026 images in queue - Ends approximately in 4 days



root@server5:~# /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=5G ./occ face:background_job"
1/8 - Executing task CheckRequirementsTask (Check all requirements)
2/8 - Executing task CheckCronTask (Check that service is started from either cron or from command)
3/8 - Executing task DisabledUserRemovalTask (Purge all the information of a user when disable the analysis.)
4/8 - Executing task StaleImagesRemovalTask (Crawl for stale images (either missing in filesystem or under .nomedia) and remove them from DB)
5/8 - Executing task CreateClustersTask (Create new persons or update existing persons)
        Skipping cluster creation, not enough data (yet) collected. For cluster creation, you need either one of the following:
        * have 1000 faces already processed
        * or you need to have 95% of you images processed
        Use stats command to track progress
        Skipping cluster creation, not enough data (yet) collected. For cluster creation, you need either one of the following:
        * have 1000 faces already processed
        * or you need to have 95% of you images processed
        Use stats command to track progress
6/8 - Executing task AddMissingImagesTask (Crawl for missing images for each user and insert them in DB)
7/8 - Executing task EnumerateImagesMissingFacesTask (Find all images which don't have faces  generated for them)
8/8 - Executing task ImageProcessingTask (Process all images to extract faces)
        NOTE: Starting face recognition. If you experience random crashes after this point, please look FAQ at https://github.com/matiasdelellis/facerecognition/wiki/FAQ
...
        Processing image /var/www/html/data/oliutyi/files/Studio/Maisternia3/2024-11-23-VAK-Krylati_Monologi2/Annaanima/_DSF2381.JPG
        Faces found: 1
        Processing image /var/www/html/data/oliutyi/files/Studio/Maisternia2/2024-02-10_VAK2_final/IMG_4229.JPG
        Faces found: 0
        Processing image /var/www/html/data/oliutyi/files/Studio/Legion2/2022-09-04_Plot_Amador_Public/Photo.Pro/046.jpg
        Faces found: 1
        Processing image /var/www/html/data/oliutyi/files/Studio/Maisternia2/2024-05-24_VAK_FINAL-Allo/Photo.Pro/Source/_DSF0862.JPG
...


  • No labels