How to run the Docker container with only Vision Detection API?

I’m running Deepstack in a Docker container. How do I control which detection API is used when it starts up? Thanks

sudo docker run -e VISION-FACE=True -v localstorage:/datastore -p 80:5000 \ deepquestai/deepstack

The -e options tell DeepStack which API’s to enable.

Details are in the documentation https://python.deepstack.cc/ (if you are using python - there is a user guide for each programming language).

Thanks Nick, I SSH’d to the Deepstack Container on my QNAP. The command failed. Thoughts?

root@deepstack:/app/server# sudo docker run -e VISION-FACE=True -v localstorage:/datastore -p 80:5000 \ deepquestai/deepstack
bash: sudo: command not found
root@deepstack:/app/server#

I think the options are: -e VISION-DETECTION=True, -e VISION-FACE=True, and -e VISION-SCENE=True

I’ve noticed that if I’m logged in as root, SUDO doesn’t work. Here’s what I am using successfully:

docker run --restart always -d -e VISION-DETECTION=True -e MODE=Low -v localstorage:/datastore -p 80:5000 --name deepstack deepquestai/deepstack:cpu-x6-beta

Oh; and then I run docker logs -f deepstack to see the status of DS.

Thanks@wilddoktor. I SSH’d to my DS container, took your command and changed the port and deepstack version name since mine are different. When I ran the command it didn’t work. Message I received was “bash: docker: command not found”. Any ideas?

I’m a complete docker n00b, so I won’t be much help. Except to say that the “docker command not found” message is pretty strange.

I ssh into my photon VM that runs docker, but I don’t log into the docker container itself; I just run the command from the root of the VM, if that makes sense.

You say you’re running the container on your QNAP; I’m unfamiliar with the QNAP interface, but can you maybe log into the QNAP rather than the container, and then run the command? Maybe at that level you’d also need to add the SUDO command as well…

1 Like

Same here, just trying anything I can think of. On the QNAP, there are apps you can install. One of them is called Container Station and it allows you to download/install Docker containers and run them from the QNAP. I didn’t think about SSH to the QNAP and not the container. I’ll try that.

Also, did you have to set up the localstorage datastore?

Yay…the blind leading the blind! :rofl:

I didn’t have to setup a datastore; I just ran the command and it seems it figured out the datastore on its own.

1 Like

Success!!! SSH to the QNAP and running the command was the trick. Thanks!

My command was a little different. Do you see any issues with it?
docker run -e VISION-DETECTION=True -v localstorage:/datastore:rw -p 32785:5000 deepquestai/deepstack:latest

The startup command you use won’t work for some reason. Also, does your Deepstack instance spin off another container with a random name?

Very cool!! I don’t know what the /datastore:rw does; I mean, I’m assuming of course that it means “read/write”, but I don’t know how that differs from /datastore by itself. Only other thing I see is that you’ll have to manually run that command every time the deepstack container gets rebooted.

Oh, and that your deepstack container is now named “Serrptitious_monkey”, or something amazing like that!

2 Likes

Thanks, it would be nice to have it automatically restart. I may look into that further. The log command to check status didn’t work for some reason. No big deal really, I’m thrilled to have it running on my QNAP instead of of my Wondows 10 PC where I have Blue Iris installed. Really appreciate your help!

I messed with that log command a lot until I figured it out. :slight_smile:

First, run docker ps - this will list your containers. Since you didn’t add the --name deepstack to your command, your container now has some random (and probably cool or funny!) name.

Once I found the random name, I deleted the container using docker rm random_name.

Then I re-installed the container, using the “docker run --restart always -d -e VISION-DETECTION=True -e MODE=Low -v localstorage:/datastore -p 80:5000 --name deepstack deepquestai/deepstack:cpu-x6-beta” string. (Or I may have had to do the “docker pull deepquestai/deepstack” command first, and then the run string. Can’t remember…) That named the container “deepstack”, and set it to start every time the container starts.

Now that I know the name of the container, the log command works…“deepstack” is simply the name of the container…could be anything, as you now know!

Whoa, I’ll need to pace myself through that! :slight_smile:

One thing I’ve noticed, the Terminal window where I ran the startup command, if I close that window, DS stops. I can’t leave Terminal running on my laptop so I’ll have to figure out how to get DS to run without me do it via SSH from my laptop.

Have you seen this? https://www.qnap.com/en/how-to/tutorial/article/how-to-use-container-station/ Maybe that can help?

1 Like