[Autogenerated] in this first demo we're going to
install openCV using Docker compose first.
We're going to clone the repository.
Then we're going to configure the open C V platform.
Then we're going to run the platform and verify the
installation as shown in the previous clip.
The source code can be found on GitHub The source code for
Docker Compose can also be found on GitHub under opencV slash
Docker Compose and there you find a link also to the
installation documentation On the space.
You can also find the requirements such as docker compose.
Docker and at least 5GB of RAM.
Now in my experience that 5GB of RAM is on the low end of the skill seven or 8
is definitely recommended and the steps that are documented here are the steps
that we're going to follow in our console locally.
I'm running a deviant distribution on the Windows
using the Windows subsystem for Linux,
let's check whether dr is properly installed using the Docker Version Command.
Then let's use it.
Docker Compose command with version to see whether
Docker Compose is installed as well.
Newer versions of Docker will actually have Docker Compose built in Great.
Both Docker as well as Docker Compose are installed.
Let's clear the screen and let's now clone the Git repository on open C v slash.
OpencV.
Docker Now let's change that directory using the cd command.
Let's clear the screen again and now we're going to copy the
configuration file that is part of the repository and rename it to
the real configuration file using the Cp command.
This is an example configuration file which we need to
edit in order to make it work for us.
Let's open up the file using our favorite editor in this instance.
This will be imax.
But of course you can use any editor that you'd like.
Although I can recommend using imax this is the default configuration of open C.
V.
And we only need to configure a few parameters and we're up and running first.
Let's change the server name and you don't need to use an I.
P address here, which you can use a hostname in my local host file.
I've mapped open Cv to local host or 127 dot oh dot oh 127.0.0.1.
Hence I'm going to use the name.
Open C.
V.
You can also use local host here.
Of course.
Then we're going to add two random secrets to the configuration file.
The first is the secret key that's being used in the background for flask.
I'm going to paste here just a random big string as data store.
Open C.
V uses post rescue L to improve the security of post rescue.
L let's remove the default password and replace it by another random string.
Note that we will need a string in order to put it in the environment file.
But first let's finish up configuring the open CSV file Let's scroll all the
way to the bottom where we configure the SMtP server why?
Well, currently the only alerting mechanism supported by OpencV is email.
So we need to tell OpenCV how it can send emails first.
Let's configure our smtP server,
the SmtP ports and then fill in a valid user name and password.
This email account is used to send emails from.
So you need an SMTP account.
Usually these accounts are supplied by a system administrator.
Then we can save the configuration file.
Let's go back to the console and now added the environment file.
Why?
Because we change the password of the post rescue L user.
Now,
we also need to change the password in the environment file which
is being used when building the Docker image.
And we need to define a new variable here called postgres
underscore password and assign it the value that we just
use in the configuration file.
So I'm going to paste the secret string here.
Now let's save this file and go back to the console.
That was all there is to it to configuring open C.
V by using the Docker compose up command with the dash dash detached flag.
We bring up the majority of the services,
the services we need to bring up our post grass,
our database back end,
read this web server and salary underscore worker These
services are all defined in the Docker compose file and
Docker Compose starts doing its thing.
It's pulling all the missing images and after having
pulled all the missing images, it will start building our open C.
V image.
This might take a while depending on your bandwidth
as well as processor capabilities.
However,
this is a one time cost as in it will now cache all downloaded images
as well as cash the image that it will build for us.
Open C v.
The next time you will run the Docker compose up command,
it will instantly start all services as they already are downloaded
and built for us as a reminder of these steps that we are
demonstrating right now and doing can be found on dot opencv dot io
slash installation slash docker once.
Docker Compose is ready with pulling all images and starting the
services now we need to initialize the database.
This is also a one time command by executing the command.
Docker, dash i T web server, open c v.
And then the upgrade dash dB command we tell OPENCV to initialize the postgres.
SQL database for us.
Don't get confused by the term upgrade DB as were
actually initializing the database.
Post rescue.
L The next step will be importing all those CV entries from the internet.
If we can do that by executing the command Docker,
then the name of the service web server,
open c v E.
And then the command import data when selecting yes
because we want to import initial data.
The process starts now this can take a long time because it needs to
download all those CvN entries from all over the years.
This is also the process that uses so much memory and is a tip check what the
exit code of this command is sometimes the process errors out because of memory
management issues and then you will get a result.
code unequal to zero.
Later on we shall see how you can check whether the database
import field or not but this is something to be aware of that
sometimes due to memory management issues.
This step might feel fortunately this is only a one time step as it needs to
download all these sources but dealt us the process which we shall do
approximately every 15 minutes is a very short step.
The previously mentioned memory requirement of five
gigabytes or actually eight gigabytes is specifically for
this one time step importing of all C.
V entries.
I didn't see any error message So I assume that the import went successful.
I'm going to clear the screen once again.
And now let's add an administrative user.
You do that by again performing the darker exact dash I T
command with the name of the server.
Web server open C V.
And then the command creates dash user then let's specify the
username better in this instance than an email address and
then the dash dash admin flag.
This will add an initial user called peter in this instance
which will be administrator of the open C.
V instance.
Let's add and repeat a strong password and our administrative user has been
created per usual clear to screen and now we're actually ready.
We started almost all services defined in the Docker Compose
file but not all of them by specifying the Docker Compose up
and then dash dash detached flag.
We start the leftover service which is the salary beat service.
This service takes care of every 15 minutes downloading
new or deltas of the change CV entries.
Now let's fire up our browser and let's go to the address that we
previously specified in the conflict file in my case,
open C V and then the port number 8000,
which is the full report number that the openCV web service
listens to do mine doted on my machine,
openCV is mapped to local host or 127 dot oh dot oh 127.0.0.1.
Use the same name here as you specified in the configuration file and
make sure that the name resolves to the correct IP address lo and behold
open C v e is up and running ye successfully.
What we see right now is that the full page and this is an overview of all most
recent CV entries to end the first demo as a sanity check,
browse at the left hand side to the little tag symbol which
stands for vendors and products and check the number of vendors
and products that has been imported.
This should look more or less the same at your local instance and let's do the
same for the bottom left icon categories and this also should match more or
less the same as you see now on the screen again.
This is making sure that the import process went successfully.
If not delete the volume and repeat the import process again in the next demo,
let's configure some notifications and start using
the alerting platform function.