tensorflow and photoprism. This shit should be packaged already. WTF
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
e30d96cbaa
commit
4400093481
|
@ -0,0 +1,66 @@
|
|||
.PHONY: control
|
||||
|
||||
VERSION=0.6.2
|
||||
BASENAME=photoprism
|
||||
|
||||
help:
|
||||
@echo
|
||||
@echo "make all # to attempt to download, extract and build the .deb package using dpkg"
|
||||
@echo
|
||||
|
||||
all: download clean extract DEBIAN build
|
||||
|
||||
# uses 'ar' to make a .deb file
|
||||
raw: download clean extract DEBIAN tar-ar
|
||||
|
||||
build-deb:
|
||||
apt install -y gcc g++ git gnupg make zip unzip
|
||||
pip install tensorflow
|
||||
|
||||
clean:
|
||||
rm -rf ../files
|
||||
rm -f ../*.deb
|
||||
rm -f ../*.tar.xz data.tar.xz
|
||||
rm -rf DEBIAN
|
||||
|
||||
download:
|
||||
@echo
|
||||
@echo This uses the binary /usr/local/bin/photoprism
|
||||
@echo
|
||||
|
||||
extract:
|
||||
cp -a files ../
|
||||
mkdir -p ../files/usr/bin
|
||||
cp /usr/local/bin/photoprism ../files/usr/bin
|
||||
|
||||
# makes the DEBIAN/ directory
|
||||
DEBIAN:
|
||||
mkdir -p DEBIAN
|
||||
|
||||
# make the md5sum file
|
||||
cd ../files/ && find -type f -exec md5sum '{}' \; |sort -k2 >../md5sums
|
||||
mv ../md5sums DEBIAN/
|
||||
|
||||
# make the control there
|
||||
mkdir -p DEBIAN
|
||||
cp control DEBIAN/
|
||||
# echo Version: ${VERSION} >>DEBIAN/control
|
||||
|
||||
cp postinst DEBIAN
|
||||
|
||||
build:
|
||||
mv DEBIAN ../files/
|
||||
cd .. && dpkg-deb --build files ${BASENAME}_${VERSION}_amd64.deb
|
||||
cd .. && dpkg-deb --info ${BASENAME}_${VERSION}_amd64.deb
|
||||
|
||||
# how to make a debian package "raw" just using tar and ar
|
||||
#
|
||||
# READ THIS AGAIN:
|
||||
#
|
||||
# A .deb file is just output from 'ar rcs'
|
||||
#
|
||||
tar-ar: control
|
||||
cd DEBIAN && tar --ignore-failed-read -cvJf ../control.tar.xz .
|
||||
cd files && tar -cvJf ../data.tar.xz .
|
||||
ar rcs ${BASENAME}_${VERSION}_amd64.deb debian-binary control.tar.xz data.tar.xz
|
||||
dpkg-deb --info ${BASENAME}_${VERSION}_amd64.deb
|
|
@ -0,0 +1 @@
|
|||
10
|
|
@ -0,0 +1,13 @@
|
|||
Source: photoprism
|
||||
Build-Depends: golang
|
||||
Package: photoprism
|
||||
Version: 0.6.2
|
||||
Maintainer: Jeff Carr <jcarr@wit.com>
|
||||
Architecture: any
|
||||
Depends:
|
||||
Description: self-hosted web application for managing and organising a photo collection
|
||||
PhotoPrism® is an AI-Powered Photos App for the Decentralized Web.
|
||||
.
|
||||
It makes use of the latest technologies to tag and find pictures automatically without
|
||||
getting in your way. You can run it at home, on a private server, or in the cloud.
|
||||
|
|
@ -0,0 +1 @@
|
|||
#!/bin/sh
|
|
@ -0,0 +1,79 @@
|
|||
.PHONY: control
|
||||
|
||||
VERSION=0.6.2
|
||||
BASENAME=tensorflow
|
||||
|
||||
help:
|
||||
@echo
|
||||
@echo "make all # to attempt to download, extract and build the .deb package using dpkg"
|
||||
@echo
|
||||
|
||||
all: download clean extract DEBIAN build
|
||||
|
||||
# uses 'ar' to make a .deb file
|
||||
raw: download clean extract DEBIAN tar-ar
|
||||
|
||||
build-deb:
|
||||
apt install -y gcc g++ git gnupg make zip unzip
|
||||
pip install tensorflow
|
||||
|
||||
build:
|
||||
apt install python3-dev python3-pip
|
||||
pip install -U --user pip numpy wheel packaging requests opt_einsum
|
||||
pip install -U --user keras_preprocessing --no-deps
|
||||
apt install bazel
|
||||
mkdir ~/tmp; cd ~/tmp/ && git clone https://github.com/tensorflow/tensorflow.git
|
||||
./configure
|
||||
bazel build [--config=option] //tensorflow/tools/pip_package:build_pip_package # for cpu support
|
||||
bazel build --config=cuda [--config=option] //tensorflow/tools/pip_package:build_pip_package # for gpu support
|
||||
./bazel-bin/tensorflow/tools/pip_package/build_pip_package --nightly_flag /tmp/tensorflow_pkg
|
||||
pip install /tmp/tensorflow_pkg/tensorflow-version
|
||||
|
||||
clean:
|
||||
rm -rf ../files
|
||||
rm -f ../*.deb
|
||||
rm -f ../*.tar.xz data.tar.xz
|
||||
rm -rf DEBIAN
|
||||
|
||||
download:
|
||||
@echo
|
||||
@echo This uses the binary /usr/local/bin/tensorflow
|
||||
@echo
|
||||
@echo pip install tensorflow
|
||||
|
||||
extract:
|
||||
cp -a files ../
|
||||
mkdir -p ../files/usr/bin
|
||||
cp /usr/local/bin/tensorflow ../files/usr/bin
|
||||
|
||||
# makes the DEBIAN/ directory
|
||||
DEBIAN:
|
||||
mkdir -p DEBIAN
|
||||
|
||||
# make the md5sum file
|
||||
cd ../files/ && find -type f -exec md5sum '{}' \; |sort -k2 >../md5sums
|
||||
mv ../md5sums DEBIAN/
|
||||
|
||||
# make the control there
|
||||
mkdir -p DEBIAN
|
||||
cp control DEBIAN/
|
||||
# echo Version: ${VERSION} >>DEBIAN/control
|
||||
|
||||
cp postinst DEBIAN
|
||||
|
||||
build:
|
||||
mv DEBIAN ../files/
|
||||
cd .. && dpkg-deb --build files ${BASENAME}_${VERSION}_amd64.deb
|
||||
cd .. && dpkg-deb --info ${BASENAME}_${VERSION}_amd64.deb
|
||||
|
||||
# how to make a debian package "raw" just using tar and ar
|
||||
#
|
||||
# READ THIS AGAIN:
|
||||
#
|
||||
# A .deb file is just output from 'ar rcs'
|
||||
#
|
||||
tar-ar: control
|
||||
cd DEBIAN && tar --ignore-failed-read -cvJf ../control.tar.xz .
|
||||
cd files && tar -cvJf ../data.tar.xz .
|
||||
ar rcs ${BASENAME}_${VERSION}_amd64.deb debian-binary control.tar.xz data.tar.xz
|
||||
dpkg-deb --info ${BASENAME}_${VERSION}_amd64.deb
|
|
@ -0,0 +1 @@
|
|||
10
|
|
@ -0,0 +1,20 @@
|
|||
Source: tensorflow
|
||||
Build-Depends: golang
|
||||
Package: tensorflow
|
||||
Version: 0.6.2
|
||||
Maintainer: Jeff Carr <jcarr@wit.com>
|
||||
Architecture: any
|
||||
Depends:
|
||||
Description: makes it easy for beginners and experts to create machine learning models
|
||||
a free and open-source software library for machine learning and artificial
|
||||
intelligence. It can be used across a range of tasks but has a particular
|
||||
focus on training and inference of deep neural networks.
|
||||
.
|
||||
TensorFlow was developed by the Google Brain team for internal Google use in
|
||||
research and production. The initial version was released under the Apache
|
||||
License 2.0 in 2015. Google released the updated version of TensorFlow, named
|
||||
TensorFlow 2.0, in September 2019.
|
||||
.
|
||||
TensorFlow can be used in a wide variety of programming languages, including
|
||||
Python, JavaScript, C++, and Java.[11] This flexibility lends itself to a range
|
||||
of applications in many different sectors.
|
|
@ -0,0 +1 @@
|
|||
#!/bin/sh
|
Loading…
Reference in New Issue