[Unit] Description=OCR Pipeline Stage 2 Worker (GPU %i) After=network.target postgresql.service [Service] Type=simple User=ubuntu WorkingDirectory=/home/local/translynx/backend Environment="PATH=/home/ubuntu/miniconda3/envs/paddlex/bin:/usr/local/bin:/usr/bin:/bin" Environment="PYTHONPATH=/home/local/translynx/backend" Environment="DATABASE_URL=postgresql://translynx:translynx2025@192.168.1.161:5432/translynx" Environment="CUDA_VISIBLE_DEVICES=%i" ExecStart=/home/ubuntu/miniconda3/envs/paddlex/bin/python -m ocr_pipeline.queue.run_worker stage2 --worker-id=stage2_gpu%i --gpu=%i Restart=always RestartSec=10 [Install] WantedBy=multi-user.target