Need help with QNAP Docker install and configuration

Looking for help if anyone has successfully set up Deepstack on a QNAP NAS using the QNAP Container Station app. Thanks!

I managed to get it up and running on my TS-251 QNAP NAS through container station - it worked as expected however inference times weren’t great (due to celeron CPU) so moved over to the Rasberry pi version with an NCS

Pretty easy to get it running and it works really well on the higher end QNAPS with GPU…until anything in the system changes and screws it up, lol.

To get Deepstack running on a QNAP

  1. Use container station and select the desired image you want to pull down. Ensure its compatible with your system. Complete the hardware resourcing and start it up. IT WILL NOT FUNCTION RIGHT NOW, we will fix that.
  2. SSH into your QNAP. Turn on the feature in the settings if not already on.
  3. If newer firmware, you will be greeted with a Console Management shell. Press “Q” to return to normal shell.
  4. Navigate to the folder that holds your docker/ContainerStation instances. “cd /share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/containers/”
  5. On the ContainerStation UI, open your Deepstack instance and get/copy the “ID” listed there.
  6. Open the folder that starts with the “ID” you just got.
  7. ****Important part. SHUT DOWN ContainerStation on the QNAP. Open App Center, find the ContainerStation app, click the down arrow below it and choose STOP. This is required to make changes to the QNAP generated config for the deepstack docker instance.
  8. Back in your ssh session, use VIM to modify the “config.v2.json” file.
  9. Type in /Env and hit enter to quickly go to the start of the environment settings. Add the settings you want. Example. “Env”:[“VISION-DETECTION=True”,“VISION-FACE=True”,"PATH=/usr
  10. Save the modified config.
  11. Go back into AppCenter and Start the Container Station app.
  12. Open ContainerStation and verify that your deepstack instance is working and you see the settings for the environmental settings you entered.
  13. Have fun with deepstack.

If you have a GPU in your QNAP, anytime you update the firmware or any of the GPU drivers it will cause issues with your instance. Easy fix, most of the time, is to change the CPU allocation via the UI while ensureing the “Please restart the container to apply these settings” is checked and hit apply. If that doesnt work, you will be rebuilding the image and making the changes to its config via ssh again, lol.

1 Like

@vabeachbum Thank you very much for taking the time to provide this incredible guideline for running DeepStack on the QNAP.

We will love publish this on our documentation site and our blog as a tutorial, with your permission.

cc: @john, @robmarkcole

I was able to get my QNAP running and I used a different process. It’s been a while but this is what I did from memory. As a new forum member, I couldn’t include many helpful screen shots.

  1. My QNAP is a TS-470.

  2. Install Container Station on the QNAP
    14 PM

  3. Download Deepstack and create the container.

  4. Once created, it should now show up in Container Station.

  5. SSH to the QNAP

  6. Run this command to get in the container
    docker exec -i -t deepstack-qnap bash

  7. Run this command to start Deepstack
    docker run -e VISION-DETECTION=True -v localstorage:/datastore:rw -p 32785:5000 deepquestai/deepstack:latest

  8. Once Deepstack starts, a new container is created with a random name where everything runs from.

  9. With my QNAP, it averages between 1,000 ms - 1,500 ms to process the AI analysis.

Permission granted, lol. All about sharing the lessons learned and helping to make it better.

1 Like