How to install PhotoPrism in Jail?

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Hmmm ...

OK. After digging a bit: there should be a package but there isn't. How can you check yourself?

1. For any software product check at freshports.org if there is a port available - in our case there is:

2. In the regular case there will be package information on that page, too. In our specific case, there isn't. You can check the source code of the port Makefile for explicitly not building a package (because of license restrictions or similar).

On the freshports page click on the "git" link for that, this leads to:

Check the Makefile for "NO_PACKAGE" - again, in our particular case, there isn't a restriction. There definitely should be packages.

3. Packages are built in the FreeBSD package build cluster. Any faults during package build are reported to the "pkg-fallout" mailing list. The archive is here:

Click on "December 2021 by subject", search for "py38-tensorflow" - bingo, package build is failing:

4. So that's why there is no package. Let's see if there's an issue on bugzilla, already. Search for "tensorflow" at bugs.freebsd.org:

Looks like there isn't. Only this different and older build error:

So, what can you do? Not much. Wait for the problem to go away. File a bug ticket at bugs.freebsd.org. Contact the ports maintainer for py-tensorflow about the issue. The contact info is in the Makefile in git (see above for the link).

HTH,
Patrick
 

botham2021

Cadet
Joined
Nov 28, 2021
Messages
7

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
Thanks for the step by step details.

Like others, I can't install py38-tensorflow either. I've confirmed /etc/pkg/FreeBSD.conf is pointing to the latest, and I've done an pkg update. It fails with the 'not found'. Did you have need some other step to get py38-tensorflow somehow?

I was still able to bring up photoprism without it. It's importing pics happily.
I did not do anything else. It seems the pkg is no longer available. When I installed it I guess I was lucky and it was still available. Doing a pkg search I get the same results as you. Perhaps you can try to build it from ports (small chance it may actually work).
 

botham2021

Cadet
Joined
Nov 28, 2021
Messages
7
I did not do anything else. It seems the pkg is no longer available. When I installed it I guess I was lucky and it was still available. Doing a pkg search I get the same results as you. Perhaps you can try to build it from ports (small chance it may actually work).

The mystery of missing package was explained by Patrick's detailed response earlier. Package build is failing these days. I'll just wait, have various other things to catch up on.
 

cap

Contributor
Joined
Mar 17, 2016
Messages
122
I never used google photo but I am very frustrated with the development of Apple's photo apps. iPhoto was just perfect for me. It had this concept of "events". Import photos and it will group them by date into events. You can merge or split them as you like - very conveniently. And you can of course name them and sort them into folders, e.g. per year. One photo is always in precisely one event.

Anyone know an app that does that? Now with Fotos instead of iPhoto all is just one continuous timeline, face detection, automatic whatever - I don't want any of that. I sort my photos as I see fit. Period. I am seeking an app that emulates a shelf full of boxes full of slides as much as possible. You label the box "Summer vacation 2018" and that's that. That's an event in iPhoto.

Just using albums in Fotos instead of events doesn't work. There is no way to tell if a particular photo is in more than one or in no album at all.

Do you think I would like Piwigo?

Thanks!
Patrick
Take a look at Mylio. This is a very good DAM with local synchronization.
It's not impossible that sooner or later a Linux version will come out (at least headless). This is discussed in their forum.

The disadvantage is that it is subscription-based. I don't know the current status. I use Mylio for a long time and still fall under the old regulation (free use up to 20K or 25K photos) for a certain time. After that, I'll have to see if I pay or look for something else.

Photoprism also looks interesting. I'll have a look when I find the time.
 

Electr0

Dabbler
Joined
Dec 18, 2020
Messages
47
Why am I having an error?
Code:
root@test:~ # cd photoprism-freebsd-port
root@test:~/photoprism-freebsd-port # make config
make: "/usr/share/mk/bsd.port.mk" line 32: Cannot open /usr/ports/Mk/bsd.port.mk
make: "/root/photoprism-freebsd-port/Makefile" line 61: Malformed conditional (${OPSYS} == FreeBSD && ${OSVERSION} > 1100000 && ${OSVERSION} < 1200000)
make: "/usr/share/mk/bsd.port.mk" line 32: Cannot open /usr/ports/Mk/bsd.port.mk
make: Fatal errors encountered -- cannot continue
make: stopped in /root/photoprism-freebsd-port

Probably because you forgot the . before the include

It should look like this:
Code:
.include <bsd.port.options.mk>
.if ${OPSYS} == FreeBSD && ${OSVERSION} > 1200000 && ${OSVERSION} < 1300000
EXTRA_PATCHES=  ${PATCHDIR}/extra-patch-docker_tensorflow_tensorflow-1.15.2_third_party_repo.bzl
.endif
 

sandvaer

Cadet
Joined
May 18, 2014
Messages
8
I installed Photoprism and tensorflow with pre built package. It is working.
But I get "2022-03-28 16:58:23 WARN index: failed converting IMG_4233.HEIC to jpeg (file type heif not supported)"

I "pkg install libheif", but still get the error trying to convert *.HEIC to jpeg.

Is it possible to solve this?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I "pkg install libheif", but still get the error trying to convert *.HEIC to jpeg.
If Photoprism relies on ImageMagick for conversion you need to manually rebuild ImageMagick with HEIC/HEIF support as describe by me here:

FreeBSD has since moved from SVN to git, so the checkout process needs to be changed. Likely like this - have not tried it, yet:
Code:
mkdir -p /usr/ports
git clone -b 2022Q1 --depth 1 https://git.freebsd.org/ports.git /usr/ports
cd /usr/ports/graphics/ImageMagick7-nox11
make config
# enable HEIF
make -DBATCH
make deinstall reinstall
pkg lock ImageMagick7-nox11
pkg autoremove

HTH,
Patrick
 
Last edited:

sandvaer

Cadet
Joined
May 18, 2014
Messages
8
If Photoprism relies on ImageMagick for conversion you need to manually rebuild ImageMagick with HEIC/HEIF support as describe by me here:

FreeBSD has since moved from SVN to git, so the checkout process needs to be changed. Likely like this - have not tried it, yet:
Code:
mkdir -p /usr/ports
git clone -b 2022Q1 --depth 1 https://git.freebsd.org/ports.git /usr/ports
cd /usr/ports/graphics/ImageMagick7-nox11
make config
# enable HEIF
make -DBATCH
make deinstall reinstall
pkg lock ImageMagick7-nox11
pkg autoremove

HTH,
Patrick
Thanks for you suggestion. I installed Imagic7 with HEIC support.

"# convert -list format | grep HEIC
AVIF* HEIC rw+ AV1 Image File Format (1.10.0)
HEIC* HEIC rw+ High Efficiency Image Format (1.10.0)"

I still get the same error in Photoprism.

Potoprism webpage say: "HEIF support is currently implemented using heif-convert, which is an external tool."

Is there anything else I can try?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Obviously you need the "heif-convert" tool, whatever that might be.

Searching for "heif" at Freshports shows that there is a "libheif" port/package:

The homepage (linked in the overview on Freshports) of "libheif" seems to confirm that "heif-convert" is part of that software:

I was about to suggest you pkg install libheif and try how far that gets you, when I re-read one of your earlier posts.
So you already did that. Hmmm ...

First, check, if the FreeBSD port of libheif installs heif-convert. Maybe it doesn't and just installs the library.
pkg info -l libheif

If that results in e.g. /usr/local/bin/heif-convert being present, then you probably need to tell Photoprism the full path to that tool somewhere in the configuration file (?) - if Photoprism does have a single central configuration file ...

If there is no "heif-convert" to be seen, you should open a ticket on the FreeBSD bugtracker for the "libheif" port asking for the tool to be added to the installation.

HTH,
Patrick
 

sandvaer

Cadet
Joined
May 18, 2014
Messages
8
Obviously you need the "heif-convert" tool, whatever that might be.

Searching for "heif" at Freshports shows that there is a "libheif" port/package:

The homepage (linked in the overview on Freshports) of "libheif" seems to confirm that "heif-convert" is part of that software:

I was about to suggest you pkg install libheif and try how far that gets you, when I re-read one of your earlier posts.
So you already did that. Hmmm ...

First, check, if the FreeBSD port of libheif installs heif-convert. Maybe it doesn't and just installs the library.
pkg info -l libheif

If that results in e.g. /usr/local/bin/heif-convert being present, then you probably need to tell Photoprism the full path to that tool somewhere in the configuration file (?) - if Photoprism does have a single central configuration file ...

If there is no "heif-convert" to be seen, you should open a ticket on the FreeBSD bugtracker for the "libheif" port asking for the tool to be added to the installation.

HTH,
Patrick
Thank you! It is working now. "pkg install libheif" don't install anything to /usr/local/bin/.

I found a fix here https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253729 I amended the pk-plist and Makefile according to the fix and changed the filename since one was updated. Then I installed the libheif port and Photoprism is now converting HEIC pictures to jpg.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I found a fix here https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253729 I amended the pk-plist and Makefile according to the fix and changed the filename since one was updated. Then I installed the libheif port and Photoprism is now converting HEIC pictures to jpg.
That's the issue I suggested you create. So somebody already did that. Let's hope the improvement gets integrated into the package soon.
 
Joined
Jan 27, 2020
Messages
577
Is there any news on this? Still no working pkg with tensorflow on freshports?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
The py-tensorflow port as well as science/libtensorflow1 are marked as broken. Unless some volunteer picks up the helm and fixes these ports, nothing is going to change.

Doesn't photoprism work without? I thought it's just for face recognition and things like that?
 
Joined
Jan 27, 2020
Messages
577
Doesn't photoprism work without? I thought it's just for face recognition and things like that?
Bummer.
face recognition was the only feature I'd love to see because for nextcloud there is also still no working tensorflow build on freebsd...
 
Top