-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from nsg/bump/v1.77.0
Bump v1.77.0
- Loading branch information
Showing
15 changed files
with
158 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v1.76.1 | ||
v1.77.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,52 @@ | ||
IMMICH_VERSION := v1.77.0 | ||
|
||
# Use our own Python, over the older one in core20 | ||
export PATH := ${SNAPCRAFT_PART_BUILD}/../../dependencies/install/usr/local/bin:$(PATH) | ||
|
||
POETRY_ENV = ${HOME}/poetry | ||
POETRY = ${POETRY_ENV}/bin/poetry | ||
|
||
.PHONY: build | ||
build: | ||
./build.sh v1.76.1 | ||
build: immich ${POETRY_ENV} | ||
${POETRY} install \ | ||
-C immich/machine-learning \ | ||
--sync \ | ||
--no-interaction \ | ||
--no-ansi \ | ||
--no-root \ | ||
--only main | ||
|
||
${POETRY} run \ | ||
-C immich/machine-learning \ | ||
pip install \ | ||
--no-deps \ | ||
-r immich/machine-learning/requirements.txt | ||
|
||
immich: | ||
git clone --branch ${IMMICH_VERSION} https://github.com/immich-app/immich.git | ||
|
||
${POETRY_ENV}: | ||
python3 -m venv ${POETRY_ENV} | ||
${POETRY_ENV}/bin/pip install -U pip setuptools | ||
${POETRY_ENV}/bin/pip install poetry | ||
|
||
.PHONY: install | ||
install: | ||
mkdir -p ${SNAPCRAFT_PART_INSTALL}/usr/src/ml | ||
mkdir -p ${SNAPCRAFT_PART_INSTALL}/opt/python-libs/ml | ||
cp -r immich/machine-learning/app ${SNAPCRAFT_PART_INSTALL}/usr/src/ml | ||
cp -r /opt/venv/ml/lib/python3.11/site-packages \ | ||
${SNAPCRAFT_PART_INSTALL}/opt/python-libs/ml/ | ||
mkdir -p ${SNAPCRAFT_PART_INSTALL}/app/machine-learning | ||
mkdir -p ${SNAPCRAFT_PART_INSTALL}/bin | ||
|
||
# Deploy application | ||
cp immich/machine-learning/log_conf.json ${SNAPCRAFT_PART_INSTALL}/app/machine-learning/ | ||
cp -r immich/machine-learning/app ${SNAPCRAFT_PART_INSTALL}/app/machine-learning/app | ||
|
||
# Deploy Python packages (installed with Poetry & pip in the build step) | ||
cp -r $(shell ${POETRY} -C immich/machine-learning env info -p)/lib/python3.11/site-packages \ | ||
${SNAPCRAFT_PART_INSTALL}/app/machine-learning/python-packages | ||
|
||
# Deploy gunicorn (installed with Poetry) and remove shebang | ||
cp $(shell ${POETRY} -C immich/machine-learning env info -p)/bin/gunicorn \ | ||
${SNAPCRAFT_PART_INSTALL}/bin/gunicorn | ||
sed -i '1d' ${SNAPCRAFT_PART_INSTALL}/bin/gunicorn | ||
|
||
# Deploy immich-machine-learning script | ||
cp immich-machine-learning ${SNAPCRAFT_PART_INSTALL}/bin/immich-machine-learning |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
. $SNAP/bin/load-env | ||
|
||
export PYTHONPATH="$SNAP/app/machine-learning/python-packages" | ||
export LD_PRELOAD="$SNAP/usr/local/lib/libmimalloc.so.2" | ||
|
||
echo "Launching machine-learning service using python version: $(python3 --version)" | ||
echo "PYTHONPATH: $PYTHONPATH" | ||
echo "LD_PRELOAD: $LD_PRELOAD" | ||
|
||
cd $SNAP/app/machine-learning | ||
python3 $SNAP/bin/gunicorn app.main:app \ | ||
-k uvicorn.workers.UvicornWorker \ | ||
-w $MACHINE_LEARNING_WORKERS \ | ||
-b $MACHINE_LEARNING_HOST:$MACHINE_LEARNING_PORT \ | ||
--log-config-json log_conf.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters