genrecon-app.service 961 B

123456789101112131415161718192021222324252627
  1. [Unit]
  2. Description=GenRecon web app (PWA + reconstruction API)
  3. After=network.target
  4. [Service]
  5. Type=simple
  6. # Only kill the web process on stop/restart — detached reconstruction runners
  7. # (run_job.py, own session) keep going so a redeploy never strands an in-flight
  8. # scan; the next startup re-attaches to them.
  9. KillMode=process
  10. WorkingDirectory=/opt/genrecon/app/backend
  11. Environment=GENRECON_JOBS_DIR=/srv/jobs
  12. Environment=GENRECON_FRONTEND_DIR=/opt/genrecon/app/frontend
  13. Environment=GENRECON_SAMPLE_GLB=/opt/genrecon/app/sample/scene.glb
  14. Environment=GENRECON_SRC=/opt/genrecon/src
  15. Environment=GENRECON_CKPTS=/opt/genrecon/ckpts
  16. Environment=GENRECON_CONDA_ENV=genrecon
  17. Environment=GENRECON_CUDA_DEVICE=5
  18. # Flip to 1 to serve the bundled demo scene without the GPU pipeline:
  19. Environment=GENRECON_MOCK=0
  20. ExecStart=/usr/bin/env bash -lc 'uvicorn app:app --host 0.0.0.0 --port 8000'
  21. Restart=on-failure
  22. RestartSec=3
  23. User=root
  24. [Install]
  25. WantedBy=multi-user.target