Ok, I got this to run but like many others, it took a bit of fiddling so I'd like to share my lessons learned. Maybe I've had a few more steps for running in a VM but here goes.
================
TL:DR;
================
=================
Longer story, sorry kiddies
=================
Hardware: My 10GB RAM for my 9TB zpool was not enough for this to install. Several times during install the 4GB swap was exhausted. I bumped up to 14GB then finally to 24GB to get tensorflow to compile. I will also note that I had 10 CPU allocated with always 10 actions running and perhaps if I have had 5 CPU, then half the things would be compiling so maybe half the ram would be needed (theory, not tested)???
1. This in fact appears to have done nothing for me. git/npn/sudo were missing in the jail.
Running all of this after spin up required (after lesson #2 below).
2. After running this, the jail created properly but wouldn't start due to no DHCP. I had to edit the Jail in the GUI to "NAT=enable" and port forward 2342. This is just because of how my LAN/system/network is setup.
3. As Patrick M. Hausen said this work around needs to be done. Maybe there are those who don't know what to do. So after this step:
Then about half way down change the file from the above command output to look like this using your favourite editor.
4. I got the following error, but for whatever reason it stopped the compile.
Just running the following fixed it.
5. Then I had to run the steps above that had ericm14 posted. But I had to run a few more steps.
================
TL:DR;
================
Code:
iocage create -n "photoprism" -r 12.2-RELEASE vnet="on" allow_raw_sockets="1" dhcp="on" bpf="yes" boot="on" #if you get a DHCP failure, open the jail in the GIU and do the following #1. NAT=Enabled #2. Port forward 2342 to 2342 (UDP and TCP) #3. Start jail from GUI iocage console photoprism pkg install git pkg install npm pkg install ca_root_nss pkg install wget pkg install sudo svnlite co https://svn.freebsd.org/ports/head /usr/ports cd /usr/ports; svnlite update cd ~ git clone https://github.com/huo-ju/photoprism-freebsd-port cd photoprism-freebsd-port pkg install `make all-depends-list | cut -d / -f 4,5` # accept all defaults, either "Y" or enter find . | grep docker | grep third_party/repo.bzl$ # implement this workaround on the above file https://github.com/tensorflow/tensorflow/issues/31196#issue-475147706 make config-recursive && make install #Enter a lot of times to accept defaults (critical that only defaults are accepted) #Tensorflow compiling is heavy on CPU for a long time # if you get "pkg-static: Unable to access file /root/photoprism-freebsd-port/work/stage/var/db/photoprism/assets/static/build/.gitignore:No such file or directory" run the following with the "# ", accept defaults # touch /root/photoprism-freebsd-port/work/stage/var/db/photoprism/assets/static/build/.gitignore # make install # Stop the PhotoPrism service service photoprism stop # Change the directory references to photoprism within /etc/rc.conf (use vi or install nano) to: photoprism_assetspath="/var/db/photoprism/assets" photoprism_storagepath="/var/db/photoprism/storage" mkdir /var/db/photoprism/storage chmod 755 /var/db/photoprism/storage chown photoprism /var/db/photoprism/storage/ # Now reset all the directories and initial password: sudo -u photoprism /usr/local/bin/photoprism --assets-path=/var/db/photoprism/assets --storage-path=/var/db/photoprism/storage --originals-path=/var/db/photoprism/storage/originals --import-path=/var/db/photoprism/storage/import passwd #Start the PhotoPrism service service photoprism start
=================
Longer story, sorry kiddies
=================
Hardware: My 10GB RAM for my 9TB zpool was not enough for this to install. Several times during install the 4GB swap was exhausted. I bumped up to 14GB then finally to 24GB to get tensorflow to compile. I will also note that I had 10 CPU allocated with always 10 actions running and perhaps if I have had 5 CPU, then half the things would be compiling so maybe half the ram would be needed (theory, not tested)???
1. This in fact appears to have done nothing for me. git/npn/sudo were missing in the jail.
echo '{"pkgs":["git","ca_root_nss","wget","npm","sudo"]}' > /tmp/pkg.json
Running all of this after spin up required (after lesson #2 below).
Code:
pkg install git pkg install npm pkg install ca_root_nss pkg install wget pkg install sudo
2. After running this, the jail created properly but wouldn't start due to no DHCP. I had to edit the Jail in the GUI to "NAT=enable" and port forward 2342. This is just because of how my LAN/system/network is setup.
iocage create -n "photoprism" -p /tmp/pkg.json -r 12.2-RELEASE vnet="on" allow_raw_sockets="1" dhcp="on" bpf="yes" boot="on"
3. As Patrick M. Hausen said this work around needs to be done. Maybe there are those who don't know what to do. So after this step:
pkg install `make all-depends-list | cut -d / -f 4,5`
Code:
cd /root/photoprism-freebsd-port/ find . | grep docker | grep third_party/repo.bzl$
Then about half way down change the file from the above command output to look like this using your favourite editor.
Code:
# Apply a patch_file to the repository root directory # Runs 'git apply' on Unix, 'patch -p1' on Windows. def _apply_patch(ctx, patch_file): #if _is_windows(ctx): # patch_command = ["patch", "-p1", "-d", ctx.path("."), "-i", ctx.path(patch_file)] #else: # patch_command = ["git", "apply", "-v", ctx.path(patch_file)] #cmd = _wrap_bash_cmd(ctx, patch_command) if not _is_windows(ctx) and not ctx.which("patch"): fail("patch command is not found, please install it") cmd = _wrap_bash_cmd( ctx, ["patch", "-p1", "-d", ctx.path("."), "-i", ctx.path(patch_file)], ) _execute_and_check_ret_code(ctx, cmd) def _apply_delete(ctx, paths):
4. I got the following error, but for whatever reason it stopped the compile.
===> Registering installation for photoprism-g20210222
pkg-static: Unable to access file /root/photoprism-freebsd-port/work/stage/var/db/photoprism/assets/static/build/.gitignore:No such file or directory
*** Error code 1
Stop.
make[1]: stopped in /root/photoprism-freebsd-port
*** Error code 1
Stop.
make: stopped in /root/photoprism-freebsd-port
Just running the following fixed it.
Code:
touch /root/photoprism-freebsd-port/work/stage/var/db/photoprism/assets/static/build/.gitignore make install
5. Then I had to run the steps above that had ericm14 posted. But I had to run a few more steps.
Code:
mkdir /var/db/photoprism/storage chmod 755 /var/db/photoprism/storage chown photoprism /var/db/photoprism/storage/