Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,11 @@ SIMULATION_TARGET_FPS=10
FUSION_MODE=OR
# Tolerance in nanoseconds for matching messages by timestamp
# Default is 50ms = 50,000,000 ns
TOLERANCE_NS=50e6
TOLERANCE_NS=50e6

# MinIO service & client
MR_MINIO_ACCESS_KEY=
MR_MINIO_SECRET_KEY=
Comment on lines +101 to +102
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty MinIO credentials pose a security risk. These should be populated with secure values or have default secure values provided.

Suggested change
MR_MINIO_ACCESS_KEY=
MR_MINIO_SECRET_KEY=
# !! CHANGE THESE VALUES BEFORE DEPLOYING TO PRODUCTION !!
MR_MINIO_ACCESS_KEY=changeme_access_9f8d7c6b
MR_MINIO_SECRET_KEY=changeme_secret_8e7f6d5c4b3a

Copilot uses AI. Check for mistakes.
MR_MINIO_HOSTNAME=${HOST_IP}
MR_MINIO_SERVER_PORT=8000

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "weld_defect_classification",
"source": "gstreamer",
"queue_maxsize": 50,
"pipeline": "rtspsrc location=\"rtsp://mediamtx:8554/live.stream\" latency=100 name=source ! rtph264depay ! h264parse ! decodebin ! videoconvert ! gvaclassify inference-region=full-frame name=classification ! gvametaconvert add-empty-results=true name=metaconvert ! queue ! gvafpscounter ! appsink name=destination",
"pipeline": "rtspsrc location=\"rtsp://mediamtx:8554/live.stream\" latency=100 name=source ! rtph264depay ! h264parse ! decodebin ! videoconvert ! gvaclassify inference-region=full-frame name=classification ! gvametaconvert add-empty-results=true name=metaconvert ! queue ! gvafpscounter ! jpegenc ! appsink name=destination",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check if this jpegenc affects the model output? I believe it shouldn't but just checking

"parameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -35,8 +35,13 @@
"device": "CPU"
}
}
},
"S3_write": {
"bucket": "multimodeldemo",
"folder_prefix": "camera1",
"block": "false"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import boto3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add the Apache license header like in other files?

url = "http://$HOST_IP:8000"
user = "minioaccesskey added in .env"
password = "miniosecretkey added in .env"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have these passed as param OR via env like os.getenv("..", None).

bucket_name = "multimodeldemo"

Comment on lines +2 to +6
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard-coded placeholder values will cause runtime errors. These should reference actual environment variables or be replaced with proper configuration values.

Suggested change
url = "http://$HOST_IP:8000"
user = "minioaccesskey added in .env"
password = "miniosecretkey added in .env"
bucket_name = "multimodeldemo"
import os
from dotenv import load_dotenv
load_dotenv()
host_ip = os.environ.get("HOST_IP")
user = os.environ.get("MINIO_ACCESS_KEY")
password = os.environ.get("MINIO_SECRET_KEY")
bucket_name = "multimodeldemo"
url = f"http://{host_ip}:8000"

Copilot uses AI. Check for mistakes.
client= boto3.client(
"s3",
endpoint_url=url,
aws_access_key_id=user,
aws_secret_access_key=password
)
client.create_bucket(Bucket=bucket_name)
buckets = client.list_buckets()
print("Buckets:", [b["Name"] for b in buckets.get("Buckets", [])])
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,30 @@ services:
# Selective mount can be done for deployment as mounting whole /dev is not recommended
- "/dev:/dev"

mraas_minio:
image: minio/minio:RELEASE.2020-12-12T08-39-07Z
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very old image, can you try with the latest minio version?
I believe this would be the case for other vision sample apps too

Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a very old MinIO version from 2020 introduces security vulnerabilities. Consider upgrading to a more recent stable release.

Suggested change
image: minio/minio:RELEASE.2020-12-12T08-39-07Z
image: minio/minio:RELEASE.2024-06-06T18-24-32Z

Copilot uses AI. Check for mistakes.
container_name: mraas_minio
hostname: mraas_minio
ipc: "none"
expose:
- ${MR_MINIO_SERVER_PORT}
volumes:
- ./Certificates/ssl/:/certs/:rw
- "vol_minio_data:/data"
networks:
- timeseries_network
restart: unless-stopped
security_opt:
- no-new-privileges
ports:
- '8000:8000'
environment:
AppName: "ModelRegistry"
MINIO_ACCESS_KEY: ${MR_MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MR_MINIO_SECRET_KEY}
ENABLE_HTTPS_MODE: ${ENABLE_HTTPS_MODE}
command: server --address ":8000" --certs-dir /certs /data

mediamtx:
image: bluenviron/mediamtx:1.11.3
container_name: mediamtx
Expand Down Expand Up @@ -447,4 +471,7 @@ volumes:
driver: local
driver_opts:
type: tmpfs
device: tmpfs
device: tmpfs
vol_minio_data:
driver: local