Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,14 @@ RUN \
IMMICH_VERSION=$(curl -sL https://api.github.com/repos/immich-app/immich/releases/latest | \
jq -r '.tag_name'); \
fi && \
curl -o \
/tmp/immich.tar.gz -L \
"https://github.com/immich-app/immich/archive/${IMMICH_VERSION}.tar.gz" && \
tar xf \
/tmp/immich.tar.gz -C \
/tmp/immich --strip-components=1 && \
curl -sL "https://github.com/mertalev/immich/archive/ml-ray.tar.gz" -o /tmp/immich.tar.gz && \
tar xf /tmp/immich.tar.gz -C /tmp/immich --strip-components=1 && \
echo "**** install machine-learning ****" && \
cd /tmp/immich/machine-learning && \
mkdir -p \
/app/immich/machine-learning && \
cp -a \
app/. \
app \
/app/immich/machine-learning && \
echo "**** cleanup ****" && \
apt-get autoremove -y --purge && \
Expand Down
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/init-config-ml/run
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pip install -U --no-cache-dir \
numpy \
onnxruntime-gpu \
Pillow \
ray[serve] \
scikit-learn \
scipy \
sentencepiece \
Expand Down
4 changes: 1 addition & 3 deletions root/etc/s6-overlay/s6-rc.d/svc-machine-learning/run
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/usr/bin/with-contenv bash

source /config/cuda-venv/bin/activate

export HOME=/tmp

exec \
s6-notifyoncheck -d -n 300 -w 5000 -c "nc -z localhost 3003" \
cd /app/immich/machine-learning s6-setuidgid abc \
python3 main.py
/config/cuda-venv/bin/serve run app.main:ingress --host 0.0.0.0 --port 3003