Use uv for Python environment

This commit is contained in:
2026-06-19 18:54:46 +08:00
parent 7083c45feb
commit 87060e30d4
17 changed files with 444 additions and 69 deletions
+5 -4
View File
@@ -6,13 +6,14 @@ Wants=network-online.target
[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/work/arm_server
WorkingDirectory=/home/pi/work/smart-inspection/arm_server
Environment=PATH=/home/pi/.local/bin:/usr/local/bin:/usr/bin:/bin
ExecStartPre=/bin/sleep 5
ExecStart=/usr/bin/python3 /home/pi/work/arm_server/arm_server.py
ExecStart=/usr/bin/env uv run --locked python arm_server.py
Restart=on-failure
RestartSec=5
StandardOutput=append:/home/pi/work/arm_server/stdout.log
StandardError=append:/home/pi/work/arm_server/stderr.log
StandardOutput=append:/home/pi/work/smart-inspection/arm_server/stdout.log
StandardError=append:/home/pi/work/smart-inspection/arm_server/stderr.log
[Install]
WantedBy=multi-user.target