# x86 Docker Migration Design **Date:** 2026-04-08 **Goal:** Package the RTSP people-flow project for direct use on an Ubuntu 24.04 x86_64 host with an NVIDIA RTX 3080 by using Docker, bundled project files, and host-side model weights. ## Scope - Target host: `xiaozheng@192.168.5.154` - Target path: `/home/x/people` - Runtime model: Docker with NVIDIA runtime - Input source: RTSP - Output: JSON window summaries under a mounted host directory - Include required model weights on the target host ## Why Docker The existing remote runtime was built on Jetson ARM64 and cannot be reused on an x86_64 RTX 3080 machine. The target host only has Python 3.12 installed, and a native port would need additional interpreter and CUDA-specific package work. Docker is the most reliable path because it isolates Python dependencies, preserves a reproducible runtime, and matches the user requirement of direct use on a new CUDA-capable machine. ## Packaging Strategy ### Host Layout The target host will contain: - `/home/x/people/people_flow_project/` - `/home/x/people/people_flow_project/weights/yolo11n.pt` - `/home/x/people/people_flow_project/weights/deepface/age_model_weights.h5` - `/home/x/people/people_flow_project/weights/deepface/gender_model_weights.h5` - `/home/x/people/people_flow_project/weights/deepface/retinaface.h5` - `/home/x/people/output/` ### Container Layout The container will: - run on Python 3.12 - install GPU-enabled PyTorch wheels - install the application dependencies - read YOLO and DeepFace weights from deterministic in-container paths - write outputs to a mounted host output directory The project source will be copied into the image at build time. The host-side `weights/` directory will also be part of the build context so the final image does not need to download weights on first start. ## Runtime Contract The image is intended to be built once on the target host and then started with a single `docker run` command using `--gpus all`. The container command will remain the existing CLI: `python main.py --config ... --output-dir ... --device cuda:0 rtsp --input ...` ## System Adaptation The target host already has: - Ubuntu 24.04 - Docker installed - NVIDIA runtime registered in Docker The adaptation work is therefore limited to: - adding the project’s Docker packaging files - transferring project code and model weights - building the image on the target host - validating the container entrypoint and GPU runtime path ## Risks - The target GPU is currently heavily occupied by another process, so a full inference validation may need to avoid competing for memory. - DeepFace and TensorFlow increase image size and build time. - Network access is required during image build unless a wheel cache is prepared separately. ## Success Criteria - The target host contains the project and all required weights under `/home/x/people` - `docker build` completes successfully - The container can run `main.py rtsp --help` - The final run command is documented for direct RTSP use