Skip to content

Commit

Permalink
v0.154 - headless mode option
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyingFathead committed Oct 10, 2024
1 parent 346f857 commit babee7d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
13 changes: 13 additions & 0 deletions DOCKER_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,24 @@ You have two options to run the Docker container: **Manually** or using the prov
-v ./logs:/app/logs \
yolov8_detection:latest
```
- **Flags Explained:**
- `-v ./config.ini:/app/config.ini`: Mounts your custom `config.ini` into the container.
- `-v ./yolo_detections:/app/yolo_detections`: Persists detection images to the host.
- `-v ./logs:/app/logs`: Stores log files on the host for easy access.
You can also try running the application with X11 forwarding on Linux systems:
```bash
docker run --gpus all --network=host --rm \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v ./config.ini:/app/config.ini \
-v ./yolo_detections:/app/yolo_detections \
-v ./logs:/app/logs \
yolov8_detection:latest
```
#### **Option 2: Using the `run_dockerized.sh` Script**
The `run_dockerized.sh` script automates the process of checking prerequisites and running the Docker container with the appropriate configurations.
Expand Down
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,9 @@ RUN pip install -r requirements.txt
# Example: EXPOSE 8000

# Define the entrypoint or command
CMD ["python3", "yolov8_live_rtmp_stream_detection.py"]

# Run the detection with GUI (requires x11docker or a X11 passthrough method!)
# CMD ["python3", "yolov8_live_rtmp_stream_detection.py"]

# Run headless (unless you're configuring X11 passthrough, this might be easier)
CMD ["python3", "yolov8_live_rtmp_stream_detection.py", "--headless"]

0 comments on commit babee7d

Please sign in to comment.