2,599
edits
Efernandez (talk | contribs) No edit summary |
Efernandez (talk | contribs) No edit summary |
||
Line 67: | Line 67: | ||
Then build the container image running the the following command from the folder containing the Dockerfile and context directory: | Then build the container image running the the following command from the folder containing the Dockerfile and context directory: | ||
< | <syntaxhighlight lang="bash"> | ||
sudo docker build \ | sudo docker build \ | ||
--network=host \ | --network=host \ | ||
-f Dockerfile \ | -f Dockerfile \ | ||
-t ridgerun/ptz-service:latest ptz-context/ | -t ridgerun/ptz-service:latest ptz-context/ | ||
</ | </syntaxhighlight> | ||
Change '''ptz-context''' to your context's path and the tag (-t) to the name you want to give to your image. | Change '''ptz-context''' to your context's path and the tag (-t) to the name you want to give to your image. | ||
Line 79: | Line 79: | ||
====Launch the container==== | ====Launch the container==== | ||
Either if you pulled the | Either if you pulled the prebuilt image or you built your own, a docker container can be launched by running the following command: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 87: | Line 87: | ||
You can modify the name you want to give to your container with the option '''--name'''. | You can modify the name you want to give to your container with the option '''--name'''. | ||
Here we are creating a container called __ptz-service__ that will start the ptz-service application in the default address and port and | Here we are creating a container called __ptz-service__ that will start the ptz-service application in the default address and port and use the default output resolution. If a different address, port, or output resolution has to be used, you can do it by running: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 107: | Line 107: | ||
The project is configured (via setup.py) to install the service with the name '''ptz'''. So to install it run: | The project is configured (via setup.py) to install the service with the name '''ptz'''. So to install it run: | ||
< | <syntaxhighlight lang="bash"> | ||
pip install . | pip install . | ||
</ | </syntaxhighlight> | ||
Then you will have the service with the following options: | Then you will have the service with the following options: | ||
Line 124: | Line 124: | ||
</pre> | </pre> | ||
After this the service will be available under the name '''ptz'''. | After this, the service will be available under the name '''ptz'''. | ||
==Examples== | ==Examples== | ||
As we mentioned | As we mentioned at the beginning of the wiki. If you see PTZ Microservice as a black box, with an input and an output. It works in this way: | ||
#Get an RTSP stream as the input. | #Get an RTSP stream as the input. |