2.1 KiB
Lightweight Native Bundle Implementation Plan
For Claude: REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
Goal: Produce a lightweight native deployment bundle for Ubuntu 24.04 x86_64 with code, weights, one editable RTSP run script, and a local venv setup path.
Architecture: Keep all code and weights inside the project directory, add one native config and two helper scripts, then create the venv on the target host instead of bundling it into the archive.
Tech Stack: Python 3.12, venv, PyTorch GPU wheels, TensorFlow, DeepFace, shell scripts
Task 1: Add native deployment files
Files:
- Create:
/Users/zxmacmini1/Documents/人流检测/people_flow_project/configs/native_x86_config.yaml - Create:
/Users/zxmacmini1/Documents/人流检测/people_flow_project/run_rtsp.sh - Create:
/Users/zxmacmini1/Documents/人流检测/people_flow_project/setup_native_venv.sh - Create:
/Users/zxmacmini1/Documents/人流检测/people_flow_project/README_NATIVE.md
Step 1: Add a native x86 config
- Point YOLO to the local project weight path.
- Keep RTSP behavior aligned with the current project.
Step 2: Add a single editable RTSP launcher
- Put
RTSP_URLandOUTPUT_DIRat the top of the file. - Run the project with
.venv/bin/python.
Step 3: Add a setup script
- Create
.venv - Install GPU-enabled PyTorch
- Install TensorFlow and project requirements
Task 2: Deploy to the target host
Files:
- No code changes required
Step 1: Sync the updated project
- Replace the target project directory while preserving weights if needed.
Step 2: Ensure weights are in project-relative paths
- Verify YOLO and DeepFace weights under
weights/.
Task 3: Validate and bundle
Files:
- No code changes required
Step 1: Run setup on the target host
- Execute the setup script.
Step 2: Validate the RTSP CLI
- Run
./.venv/bin/python main.py rtsp --help.
Step 3: Create the lightweight tarball
- Exclude
.venv - Keep code, scripts, configs, docs, and weights