Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 12 Next »

Note: These are instructions on how to set up a serverless (aka offline) setup for CVAT. We usually stick with the web-based app app.cvat.ai which does not require any of these steps.

 Table of Contents

Installing the Necessary Programs

Windows Subsystem for Linux (WSL)

 notes from google doc

  • NOTE: When you enable WSL and install a Linux distribution, you are installing a new file system, separated from the Windows NTFS C:\ drive on your machine. Aka installing Git on WSL does not install Git in Windows and vise versa

Accessing Windows PowerShell

  1. Using the search bar located on the bottom of the screen, search for “PowerShell”

  2. Open the Windows PowerShell application

  3. In the window that appears, type

    wsl --install

    then hit the.Enter key

Google Chrome

 notes from google docs
  • Install Google Chrome

    • use winget

      • winget install google.chrome
        • The terminal will prompt you saying

        • The `msstore` source requires that you view the following agreements before using.
          Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
          The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US").
          
          
          Do you agree to all the source agreements terms?
          [Y] Yes  [N] No: 
          • Type Y to continue

        • winget show google.chrome

          will show all the details of google chrome

    • Or install from this link: https://www.google.com/chrome/   

      • Direct download link: 

Docker Desktop

 notes from google docs
  • Install Docker Desktop

    • Use winget again

      • winget install Docker.DockerDesktop
        • You may need to agree to the source agreements again first, just type Y

    • Or install using this link: https://docs.docker.com/desktop/setup/install/windows-install/  

    • Once installed, open Docker Desktop and click on the cog wheel to access settings

    • Click on Resources in the sidebar

    • Click on WSL Integration on the sidebar

    • Ensure that the box next to “Enable integration with my default WSL distro” is checked

    • Click the toggle for “Enable integration with additional distros:” to turn it on as well for good measure

    • Click “Apply and Restart”

    • Note: for some unknown reason quitting docker desktop does not actually end the program and tasks, you have to end the tasks in task manager to fully shut it down or you need to quit docker from the hidden icons in the taskbar

Git

 notes from google docs

Windows Terminal

 notes from google docs

Install Terminal (Optional)

Note: for silent install use msiexec, see more at https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/msiexec t

Note to obtain computer specifications

  • In PowerShell on Windows 

     command Get-ComputerInfo -Property “os*”
    • Will tell you all the specifications of your operating system

  • Or command

    Get-ComputerInfo -Property “osname”
    • Will only tell you the name of the operating system (i.e. Microsoft Windows 11 Pro)


Installing CVAT

 notes from google docs
  • Windows

    • Run the Linux distribution that was installed (Ubuntu) by searching Ubuntu in the start menu and running it

    • Or search for Terminal in the start menu and right click on it and Select Ubuntu in the dropdown

    • In the window that opens type the following to clone the CVAT source code from the github repository

      • git clone https://github.com/cvat-ai/cvat
    • Change to the cvat directory you just made

      • cd cvat
    • Run docker containers

      • docker compose up -d
    • Create a superuser 

      • sudo docker exec -it cvat_server bash -ic 'python3 ~/manage.py createsuperuser'
        • Input the administrator password when prompted

          •  Note, the characters that you type will NOT show up in the window, when you’re finished typing the password just hit the “enter” key

        • Create a username (default is django) 

          • If you want to use the default just hit enter

        • Input your email when prompted

        • Create a password for your user

          • Note the characters that you enter will not appear in the window

            • Hit enter when done

        • Re-input the password

          • The characters will not appear in the window


Opening CVAT

 notes from google docs

Opening CVAT

  • Open Google Chrome 

  • Go to localhost:8080

  • Type your login and password for the superuser and press the login button


Installing the Segment Anything Model (SAM)

 notes from google docs

SAM installation

  • https://github.com/facebookresearch/segment-anything?ref=blog.roboflow.com

  • Windows 

    • Bring up CVAT with auto annotation tool

    • Open ubuntu

    • Change to cvat directory

    • Stop any docker containers using docker compose down

    • Run 

      • docker compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml up -d
    • To stop containers 

      • docker compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml down
    • Install nuclio

      • https://github.com/nuclio/nuclio#quick-start-steps

      • Important:

        • CHECK WHAT VERSION OF NUCTL IS CALLED FOR IN DOCKER-COMPOSE.SERVERLESS.YML

          • Do this by using the in terminal text editor nano

          • To open a specific file using nano type nano <filepath>

            • To open docker-compose.serverless.yml

              • nano components/serverless/docker-compose.serverless.yml
              • Look at what version number is listed under “image:”

                • In this case it is 1.13.0

            • To close nano press CTRL+X

      • Use wget to pull the specific version of nuclio that matches what is found in docker-compose.serverless.yml

      • wget https://github.com/nuclio/nuclio/releases/download/ <version>/nuctl-<version>-linux-amd64

        • Where <version> is replaced by the number that you need

        • So

          • wget https://github.com/nuclio/nuclio/releases/download/1.13.0/nuctl-1.13.0-linux-amd64 
      • Give nuclio the permissions to do a soft link

        • sudo chmod +x nuctl-<version>-linux-amd64
          sudo ln -sf $(pwd)/nuctl-<version>-linux-amd64 /usr/local/bin/nuctl
          • Where <version> is the version you downloaded

            • sudo chmod +x nuctl-1.13.0-linux-amd64
            • sudo ln -sf $(pwd)/nuctl-1.13.0-linux-amd64 /usr/local/bin/nuctl
      • Deploy a couple functions

        ./serverless/deploy_cpu.sh serverless/openvino/dextr
        ./serverless/deploy_cpu.sh serverless/openvino/omz/public/yolo-v3-tf
      • Open nuclio dashboard using

        • Localhost:8070

      • Deploy SAM function

        • cd serverless && ./deploy_cpu.sh pytorch/facebookresearch/sam/nuclio/


Running CVAT and SAM

 notes from google docs

Starting up CVAT with SAM

  • Open docker

    • Optional: close docker window

  • Open ubuntu

    • Change to cvat root directory

      • cd cvat
    • If SAM is installed 

      • Run 

        • docker compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml up -d
      • Then run

        • cd serverless && ./deploy_cpu.sh pytorch/facebookresearch/sam/nuclio/
    • If SAM is not installed

      • docker compose up -d
  • Open Chrome

    • Go to localhost:8080

    • Login

  • You have now opened CVAT

If SAM is installed

If SAM is not installed


Shutting Everything Down

Stopping CVAT

Stopping Docker

 notes from google docs

To stop docker containers

In ubuntu type

  • docker compose down

    or

  • docker compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml down

  • No labels