diff --git a/Dockerfile b/Dockerfile index 9946f82..7cfc2cc 100755 --- a/Dockerfile +++ b/Dockerfile @@ -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 && \ diff --git a/root/etc/s6-overlay/s6-rc.d/init-config-ml/run b/root/etc/s6-overlay/s6-rc.d/init-config-ml/run index 2318344..432a076 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-config-ml/run +++ b/root/etc/s6-overlay/s6-rc.d/init-config-ml/run @@ -19,6 +19,7 @@ pip install -U --no-cache-dir \ numpy \ onnxruntime-gpu \ Pillow \ + ray[serve] \ scikit-learn \ scipy \ sentencepiece \ diff --git a/root/etc/s6-overlay/s6-rc.d/svc-machine-learning/run b/root/etc/s6-overlay/s6-rc.d/svc-machine-learning/run index 7c493f8..d0a121e 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-machine-learning/run +++ b/root/etc/s6-overlay/s6-rc.d/svc-machine-learning/run @@ -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