feat: initialize managed portal

This commit is contained in:
Yoilun
2026-04-27 10:04:36 +08:00
commit d4e351df71
145 changed files with 13425 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
# x86 Docker Migration Implementation Plan
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
**Goal:** Make the RTSP people-flow project directly usable on Ubuntu 24.04 x86_64 with an RTX 3080 by transferring code and weights and building a Docker image on the target host.
**Architecture:** Use a Docker-based runtime for Python 3.12, GPU-enabled PyTorch, DeepFace, and the existing project CLI. Keep weights in a deterministic project directory and bake them into the image during build so runtime startup does not trigger downloads.
**Tech Stack:** Docker, NVIDIA Container Runtime, Python 3.12, PyTorch, Ultralytics, DeepFace
---
### Task 1: Add Docker packaging files
**Files:**
- Create: `/Users/zxmacmini1/Documents/人流检测/people_flow_project/Dockerfile`
- Create: `/Users/zxmacmini1/Documents/人流检测/people_flow_project/docker-compose.yml`
- Create: `/Users/zxmacmini1/Documents/人流检测/people_flow_project/.dockerignore`
- Create: `/Users/zxmacmini1/Documents/人流检测/people_flow_project/scripts/run_rtsp_docker.sh`
- Modify: `/Users/zxmacmini1/Documents/人流检测/people_flow_project/README.md`
**Step 1: Define the image build**
- Base the image on Python 3.12.
- Install required OS packages for OpenCV and ffmpeg.
- Install GPU-enabled PyTorch and project dependencies.
- Copy project source and weights into the image.
**Step 2: Add a Docker run wrapper**
- Provide a shell script that accepts RTSP URL and output directory.
- Use `--gpus all`.
**Step 3: Update the README**
- Document the Docker build and run commands.
- Document where weights must live if the host directory is rebuilt.
### Task 2: Prepare the project tree for weights
**Files:**
- Create: `/Users/zxmacmini1/Documents/人流检测/people_flow_project/weights/.gitkeep`
- Create: `/Users/zxmacmini1/Documents/人流检测/people_flow_project/weights/deepface/.gitkeep`
**Step 1: Create weight directories**
- Reserve stable paths for YOLO and DeepFace weights.
### Task 3: Transfer the project and weights to the target host
**Files:**
- No code changes required
**Step 1: Copy the project**
- Transfer the project directory to `/home/x/people/people_flow_project`.
**Step 2: Copy YOLO and DeepFace weights**
- Place YOLO and DeepFace weights into the target project `weights/` tree.
### Task 4: Build and validate on the target host
**Files:**
- No code changes required
**Step 1: Build the image**
- Run `docker build` under `/home/x/people/people_flow_project`.
**Step 2: Validate the CLI**
- Run the container with `python main.py rtsp --help`.
**Step 3: Provide the final RTSP run command**
- Document the exact `docker run` invocation for the target host.