This the multi-page printable view of this section. Click here to print.
Advanced
- 1: Installation Analytics
- 2: Semi-automatic and Automatic Annotation
- 3: Mounting cloud storage
- 4: Backup guide
1 - Installation Analytics
It is possible to proxy annotation logs from client to ELK. To do that run the following command below:
Build docker image
Run docker container
At the moment it is not possible to save advanced settings. Below values should be specified manually.
Time picker default
{ “from”: “now/d”, “to”: “now/d”, “display”: “Today”, “section”: 0 }
Time picker quick ranges
2 - Semi-automatic and Automatic Annotation
⚠ WARNING: Do not use
docker-compose up
If you did, make sure all containers are stopped bydocker-compose down
.
-
To bring up cvat with auto annotation tool, from cvat root directory, you need to run:
If you did any changes to the docker-compose files, make sure to add
--build
at the end.To stop the containers, simply run:
-
You have to install
nuctl
command line tool to build and deploy serverless functions. Download version 1.5.16. It is important that the version you download matches the version in docker-compose.serverless.yml. For example, using wget.wget https://github.com/nuclio/nuclio/releases/download/<version>/nuctl-<version>-linux-amd64
After downloading the nuclio, give it a proper permission and do a softlink.
sudo chmod +x nuctl-<version>-linux-amd64 sudo ln -sf $(pwd)/nuctl-<version>-linux-amd64 /usr/local/bin/nuctl
-
Create
cvat
project inside nuclio dashboard where you will deploy new serverless functions and deploy a couple of DL models. Commands below should be run only after CVAT has been installed usingdocker-compose
because it runs nuclio dashboard which manages all serverless functions.Note:
- See deploy_cpu.sh for more examples.
GPU Support
You will need to install Nvidia Container Toolkit. Also you will need to add
--resource-limit nvidia.com/gpu=1 --triggers '{"myHttpTrigger": {"maxWorkers": 1}}'
to the nuclio deployment command. You can increase the maxWorker if you have enough GPU memory. As an example, below will run on the GPU:Note:
- The number of GPU deployed functions will be limited to your GPU memory.
- See deploy_gpu.sh script for more examples.
- For some models (namely SiamMask) you need an Nvidia driver version greater than or equal to 450.80.02.
Note for Windows users:
If you want to use nuclio under Windows CVAT installation you should install Nvidia drivers for WSL according to this instruction and follow the steps up to “2.3 Installing Nvidia drivers”. Important requirement: you should have the latest versions of Docker Desktop, Nvidia drivers for WSL, and the latest updates from the Windows Insider Preview Dev channel.
Troubleshooting Nuclio Functions:
-
You can open nuclio dashboard at localhost:8070. Make sure status of your functions are up and running without any error.
-
Test your deployed DL model as a serverless function. The command below should work on Linux and Mac OS.
-
To check for internal server errors, run
docker ps -a
to see the list of containers. Find the container that you are interested, e.g.,nuclio-nuclio-tf-faster-rcnn-inception-v2-coco-gpu
. Then check its logs bydocker logs <name of your container>
e.g., -
To debug a code inside a container, you can use vscode to attach to a container instructions. To apply your changes, make sure to restart the container.
3 - Mounting cloud storage
AWS S3 bucket as filesystem
Ubuntu 20.04
Mount
-
Install s3fs:
-
Enter your credentials in a file
${HOME}/.passwd-s3fs
and set owner-only permissions: -
Uncomment
user_allow_other
in the/etc/fuse.conf
file:sudo nano /etc/fuse.conf
-
Run s3fs, replace
bucket_name
,mount_point
:
For more details see here.
Automatically mount
Follow the first 3 mounting steps above.
Using fstab
-
Create a bash script named aws_s3_fuse(e.g in /usr/bin, as root) with this content (replace
user_name
on whose behalf the disk will be mounted,backet_name
,mount_point
,/path/to/.passwd-s3fs
): -
Give it the execution permission:
-
Edit
/etc/fstab
adding a line like this, replacemount_point
):
Using systemd
-
Create unit file
sudo nano /etc/systemd/system/s3fs.service
(replaceuser_name
,bucket_name
,mount_point
,/path/to/.passwd-s3fs
): -
Update the system configurations, enable unit autorun when the system boots, mount the bucket:
Check
A file /etc/mtab
contains records of currently mounted filesystems.
Unmount filesystem
If you used systemd to mount a bucket:
Microsoft Azure container as filesystem
Ubuntu 20.04
Mount
-
Set up the Microsoft package repository.(More here)
-
Install
blobfuse
andfuse
:For more details see here
-
Create environments (replace
account_name
,account_key
,mount_point
): -
Create a folder for cache:
-
Make sure the file must be owned by the user who mounts the container:
-
Create the mount point, if it doesn’t exists:
-
Uncomment
user_allow_other
in the/etc/fuse.conf
file:sudo nano /etc/fuse.conf
-
Mount container(replace
your_container
):
Automatically mount
Follow the first 7 mounting steps above.
Using fstab
-
Create configuration file
connection.cfg
with same content, change accountName, select one from accountKey or sasToken and replace with your value: -
Create a bash script named
azure_fuse
(e.g in /usr/bin, as root) with content below (replaceuser_name
on whose behalf the disk will be mounted,mount_point
,/path/to/blobfusetmp
,/path/to/connection.cfg
): -
Give it the execution permission:
-
Edit
/etc/fstab
with the blobfuse script. Add the following line(replace paths):
Using systemd
-
Create unit file
sudo nano /etc/systemd/system/blobfuse.service
. (replaceuser_name
,mount_point
,container_name
,/path/to/connection.cfg
): -
Update the system configurations, enable unit autorun when the system boots, mount the container:
Or for more detail see here
Check
A file /etc/mtab
contains records of currently mounted filesystems.
Unmount filesystem
If you used systemd to mount a container:
If you have any mounting problems, check out the answers to common problems
Google Drive as filesystem
Ubuntu 20.04
Mount
To mount a google drive as a filesystem in user space(FUSE) you can use google-drive-ocamlfuse To do this follow the instructions below:
-
Install google-drive-ocamlfuse:
-
Run
google-drive-ocamlfuse
without parameters:This command will create the default application directory (~/.gdfuse/default), containing the configuration file config (see the wiki page for more details about configuration). And it will start a web browser to obtain authorization to access your Google Drive. This will let you modify default configuration before mounting the filesystem.
Then you can choose a local directory to mount your Google Drive (e.g.: ~/GoogleDrive).
-
Create the mount point, if it doesn’t exist(replace mount_point):
-
Uncomment
user_allow_other
in the/etc/fuse.conf
file:sudo nano /etc/fuse.conf
-
Mount the filesystem:
Automatically mount
Follow the first 4 mounting steps above.
Using fstab
-
Create a bash script named gdfuse(e.g in /usr/bin, as root) with this content (replace
user_name
on whose behalf the disk will be mounted,label
,mount_point
): -
Give it the execution permission:
-
Edit
/etc/fstab
adding a line like this, replacemount_point
):For more details see here
Using systemd
-
Create unit file
sudo nano /etc/systemd/system/google-drive-ocamlfuse.service
. (replaceuser_name
,label
(defaultlabel=default
),mount_point
): -
Update the system configurations, enable unit autorun when the system boots, mount the drive:
For more details see here
Check
A file /etc/mtab
contains records of currently mounted filesystems.
Unmount filesystem
If you used systemd to mount a drive:
4 - Backup guide
About CVAT data volumes
Docker volumes are used to store all CVAT data:
-
cvat_db
: PostgreSQL database files, used to store information about users, tasks, projects, annotations, etc. Mounted intocvat_db
container by/var/lib/postgresql/data
path. -
cvat_data
: used to store uploaded and prepared media data. Mounted intocvat
container by/home/django/data
path. -
cvat_keys
: used to store user ssh keys needed for synchronization with a remote Git repository. Mounted intocvat
container by/home/django/keys
path. -
cvat_logs
: used to store logs of CVAT backend processes managed by supevisord. Mounted intocvat
container by/home/django/logs
path. -
cvat_events
: this is an optional volume that is used only when Analytics component is enabled and is used to store Elasticsearch database files. Mounted intocvat_elasticsearch
container by/usr/share/elasticsearch/data
path.
How to backup all CVAT data
All CVAT containers should be stopped before backup:
Please don’t forget to include all the compose config files that were used in the docker-compose command
using the -f
parameter.
Backup data:
Make sure the backup archives have been created, the output of ls backup
command should look like this:
How to restore CVAT from backup
Note: CVAT containers must exist (if no, please follow the installation guide). Stop all CVAT containers:
Restore data:
After that run CVAT as usual: