Lucas/docker setup#9
Merged
Merged
Conversation
…s/docker-setup
…ges, also added CI tests
There was a problem hiding this comment.
Pull request overview
Adds Docker-based packaging and a simple image-driven test harness for the Python CV worker, aiming to make the phone-detection pipeline easier to run consistently without a local Python environment.
Changes:
- Add a
python/Dockerfilethat installs CV runtime deps, installs Python requirements, and downloads the YOLOX-S ONNX model during build. - Add Docker-focused usage documentation (
python/docker_README.md) and a.dockerignorefor cleaner build contexts. - Add a small CLI script to run phone detection on a static image (
python/cv/phone_image_test.py).
Reviewed changes
Copilot reviewed 4 out of 7 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| python/Dockerfile | Builds a slim Python image with OpenCV/MediaPipe runtime libs, installs deps, and fetches the YOLOX model. |
| python/docker_README.md | Documents Docker and local workflows for running image-based detection and webcam testing. |
| python/cv/phone_image_test.py | Adds a simple command-line entry point to run detect_phone() on an image file. |
| python/.dockerignore | Excludes venv/caches and model artifacts from Docker build context. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Download the model: | ||
|
|
||
| ```bash | ||
| ./setup.sh |
Comment on lines
+17
to
+19
| # Download YOLOX-S phone detection model into the image | ||
| RUN mkdir -p models && \ | ||
| python -c "import urllib.request; urllib.request.urlretrieve('https://github.com/Megvii-BaseDetection/YOLOX/releases/download/0.1.1rc0/yolox_s.onnx', 'models/yolox_s.onnx')" |
| from phone_detector import detect_phone | ||
|
|
||
|
|
||
| def main(): |
rxv801
approved these changes
Jun 12, 2026
rxv801
left a comment
Owner
There was a problem hiding this comment.
After pr 14 we need to add the gaze detector in it too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docker readme for py CV, camera test in docker using funciton and images, also added CI tests
this PR is not part of Electron, its just dockerization, ignore the warnings