Run Machine Learning container on remote machine

Hi. I was running immich on a raspberry pi 4 model B with raspbian arm64 via docker compose with ML on same machine with no problems but high CPU usage. I want to run the ML container on a more powerful remote machine. I have tailscale running on both rpi and remote machine. I have provided my trial setup and issue in comments. Please help me in solving the issue.
5 Replies
coding-doctor
coding-doctorOP2y ago
docker-compose file in remote machine:
services:
immich-machine-learning:
container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning
volumes:
- ./immich_model-cache:/cache
env_file:
- .env
ports:
- 3003:3003
restart: always
services:
immich-machine-learning:
container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning
volumes:
- ./immich_model-cache:/cache
env_file:
- .env
ports:
- 3003:3003
restart: always
I have removed the ml service in rpi compose. Added:
IMMICH_MACHINE_LEARNING_URL=http://<remote-server-ip>:3003
IMMICH_MACHINE_LEARNING_URL=http://<remote-server-ip>:3003
in .env of rpi I have tried with both tailscale ip and public ip after opening the firewall. But the ML remote container isn't producing any output or logs and the ML jobs on rpi are not being completed. How can I set it up correctly?
bo0tzz
bo0tzz2y ago
Have you made sure you can reach the remote machine from the rpi, just with ping/curl?
coding-doctor
coding-doctorOP2y ago
yes I can reach it
bo0tzz
bo0tzz2y ago
What's the result of curl http://<remote server>:3003/ping?
coding-doctor
coding-doctorOP2y ago
PING remote-ip (remote-ip) 56(84) bytes of data. 64 bytes from remote-ip: icmp_seq=1 ttl=50 time=233 ms 64 bytes from remote-ip: icmp_seq=2 ttl=50 time=232 ms 64 bytes from remote-ip: icmp_seq=3 ttl=50 time=232 ms ^X64 bytes from remote-ip: icmp_seq=4 ttl=50 time=232 ms ^C --- remote-ip ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 232.328/232.495/232.850/0.207 ms Issue resolved. It was an issue with correct version of the image to be pulled. Thanks @bo0tzz . Sorry for the trouble.

Did you find this page helpful?