Introduction
This guide is intended for Frigate users looking to integrate the MemryX detector into their Proxmox-hosted setups.
VM Setup
To get started, you’ll need to configure your VM settings to allow PCIe pass-through between your VM and host system. We recommend that you create a Proxmox VM with Ubuntu 24.04, and use these settings for the VM hardware:
- Machine type: Q35
- BIOS: OVMF UEFI
- PCIe host devices (duplicate this to add multiple connected MX3s):
- Raw device
- Device: select your MX3’s ID from the dropdown
- All functions: true
- ROM-bar: false
- PCI-Express: true
Once the VM is created and Ubuntu 24.04 is installed, inside the VM you can follow the usual SDK install process, followed by setting up the Frigate docker container.
Troubleshooting & Potential Issues
If you see the MX3 device does exist in the container and the driver loads (acclBench --hello should show your installed device(s)), but Frigate is failing to start and has errors around the MemryX detector, the issue may be firmware-related, e.g., the auto-update during driver install in the VM might have failed.
You can perform a manual firmware update inside the Ubuntu VM using the following commands in a terminal:
sudo rmmod memx_cascade_plus_pcie
sudo mxfw_pcie_update_flash -f /lib/firmware/cascade_4chips_flash.bin
When the update completes, restart both the Proxmox host and the Ubuntu VM.
Final Thoughts
We hope this guide is helpful to the Frigate community. If you have any questions or encounter an issue with your setup, the MemryX team is here to help!
Hi,
Thanks for the excellent guide!
I’ve followed the guide and it seems to be working. I successfully installed the 2.1 SDK and manually updated the firmware per the instructions. I used Debian 13. Rebooted both the host and the VM.
It seems to work, but my logs are riddled with this output every ~10 seconds or so. Also, my inference speed seems high for such a powerful device (currently only experimenting with ONE camera), but maybe this is normal?
EDIT: As an update, upon referencing the docs, it looks like this inference speed is pretty normal when running YOLOv9 - so I just need to get to the bottom of why I’m getting all of the “fops_read: wait timeout 10(s), retrying again” log spams. I seem to be missing lots of detections. I’m detecting cars and MANY cars drive by, but few of them actually get detected.
EDIT2: I retract the previous statement – my detections are actually really good. I’m new to this and experimenting with object detection, so I’ve learned a lot in a short amount of time.
I really would appreciate any input on the fops_read log spam - what does it even mean?
Also, is there a way to use the memryx inside a container by passing through the device directly from the host (install drivers on host and pass through the device, like you can do with a hailo-8)? This would seem to use less resources than running a full VM.
Any ideas? Thanks in advance!
Hello @samwathegreat, thanks for your questions and support!
I’m happy to hear your setup is working properly! You can always experiment with the detection confidence threshold in the Frigate config (see the detection_threshold variable in the docs) to find what works best for you, but it sounds like you’re getting the hang of things.
Regarding your question about the timeout logs, these have to do with the logic Frigate uses to determine whether to send frames to the MemryX detector. Detection is only triggered and activated when some motion is detected in your stream by Frigate’s algorithm. As such, if your camera stream is quite still for some time, frames are not sent to the detector for efficiency purposes. In the context of Frigate, the logs you see are the module’s way of communicating that it is not actively receiving input frames but is prepared to process them when motion is detected and frames are sent to the device. Unfortunately, there is not a way to silence these logs, but you may find them useful down the line for understanding what is actively happening with the MemryX detector. Sorry for the inconvenience!
If you are referring to running Frigate locally inside a docker container, which is the standard setup, this is absolutely possible with MemryX! We actually recommend this as the easiest way to get started. The Proxmox guide is just for users who prefer to run Frigate inside a VM; this is absolutely not a requirement. I’d suggest referring to our setup guide on the MemryX Devblog for instructions to set up Frigate+MemryX without a VM.
Thanks again for your feedback. Feel free to reach back out if you have any lingering questions!
Hi @lindsay.morel
Thanks for the reply! I’m relieved to know that the log spam is nothing to worry about. Your explanation makes perfect sense – I’ve since added a few more cameras to this set-up and the spam has disappeared (obviously since the device is no longer idle with combined input from all the cameras!).
My question regarding a container was about how to pass-through the memryx device to an LXC container via proxmox, not docker. This is routinely done with other detectors such as the coral and hailo. Do you have any tutorials on how to achieve this? I would rather run frigate via docker inside an LXC than run it via docker inside a VM.
I’m actually running frigate via docker inside an LXC on a few other machines, but not with a detector (just 24/7 recording).
On the others, such as the hailo, you install the drivers on the HOST (proxmox machine), and then pass-through the device (e.g. /dev/memx0) to the lxc container. I know sometimes it’s tricky to get the permissions and such perfect, but I know that it works with the other devices because there are several turorials. Hoping to achieve the same with Memryx and looking forward to any input you have!
Thanks!!
Hi again,
Sorry for the delay in my response - I had to do a bit of testing to confirm running Frigate+MemryX in a Proxmox LXC is possible. Good news! We got things up and running today.
I’ll try to make some formal documentation about this in the near future, but for now, here are some pointers for creating your LXC in Proxmox and enabling passthrough for the MemryX detector.
I started by using pct to create a privileged Ubuntu 24.04 LXC. The config file located at /etc/pve/lxc/<container_id>.conf will need to resemble the following:
Enter your LXC and verify that all MemryX mounts from the <container_id.conf file are showing up. In particular, the below commands should return the following:
Next, you can create the following three directories and navigate to /opt/frigate:
mkdir -p /opt/frigate/config
mkdir -p /opt/frigate/media
mkdir -p /opt/frigate/cache
cd /opt/frigate
Create your docker-compose.yml file as follows and paste the content that appears below:
nano docker-compose.yml
version: "3.9"
services:
frigate:
container_name: frigate
image: ghcr.io/blakeblackshear/frigate:stable
privileged: true
restart: unless-stopped
shm_size: "512mb"
devices:
- /dev/memx0:/dev/memx0
volumes:
- /etc/localtime:/etc/localtime:ro
- ./config:/config
- ./media:/media/frigate
- ./cache:/tmp/cache
- /mnt/mxa_manager:/run/mxa_manager
ports:
- "5000:5000"
- "8971:8971"
- "8554:8554"
- "8555:8555/tcp"
- "8555:8555/udp"
Next, you can create your Frigate config.yml file and paste the content below (of course, the cameras/model selection will have to be adjusted to your preferences):
nano config/config.yml
mqtt:
enabled: false
detectors:
memx0:
type: memryx
device: PCIe:0
model:
model_type: yolo-generic
width: 320
height: 320
input_tensor: nchw
input_dtype: float
labelmap_path: /labelmap/coco-80.txt
cameras:
camera_1:
ffmpeg:
inputs:
- path:
rtsp://your-camera-url
roles:
- detect
detect:
enabled: true
version: 0.17-0
That’s about it! You can start the container by running docker-compose up -d and verify things are working as expected with docker logs -f frigate. Let me know if you have any questions or run into trouble; we’re happy to help you here. Thanks so much!
This is very exciting and when I share it with the Proxmox & Frigate communities, hopefully you will sell lots more Memryx devices!!!
I am a little unclear on the driver details. Did you install the drivers on the host? If yes, could you include details regarding that?
Happy to wait for the full write-up - not in a rush. Just happy that we know that it WILL work!
I’m excited to work on replicating your success soon. Hopefully I’m able to make it work unprivileged (probably with trickier permissions) and if I do, I will share the details (if you haven’t already by then)!
Thanks so much! We’ve really enjoyed working with the Frigate community so far and would love to continue!
Sorry for glossing over the driver installation. You will need the drivers installed on the Proxmox host, which can be done following the instructions on our Developer Hub. Remember that the released version of Frigate requires version 2.1 for MemryX installations, so please pay close attention to the versions used in the attached link above. Also, remember to reboot the host system following the driver installation.
I look forward to hearing about your experience soon! I’ll try to experiment with unprivileged containers when I have some spare time, but if you beat us to it, please let me know. In the meantime, I’ll work on preparing documentation to share here on the community forum.
Thanks again!