Giter Club home page Giter Club logo

Comments (8)

bsekachev avatar bsekachev commented on July 18, 2024

Good idea,
I will prepare step by step manual at near time.

from cvat.

bsekachev avatar bsekachev commented on July 18, 2024

So, I have tried next steps on clean Ubuntu 18.04. You need:

  • Install some dependencies and applications:
sudo apt-get install curl redis-server python3-dev python3-pip python3-venv libldap2-dev libsasl2-dev -y
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt-get install code -y
  • Perform CVAT installation steps
git clone https://github.com/opencv/cvat
cd cvat && mkdir logs keys .vscode
python3 -m venv .env
. .env/bin/activate
pip install --upgrade wheel
pip install -r cvat/requirements/development.txt 
python manage.py migrate
python manage.py collectstatic
  • Put launch.json (launch.zip) to cvat/.vscode dir

  • Create super user and run Visual Studio Code from virtual environment

python manage.py createsuperuser
code

In visual studio code:

  1. Go to extensions and install "Debugger for Chrome" (also you can debug it directly in the browser . It more convenience for me) and Python. Reload.
  2. Open cvat dir (Ctrl+O and open), select "CVAT Debugging" configuration and press F5.
  3. You are great!

We will update contributing.md in near future.

from cvat.

raunilillemets avatar raunilillemets commented on July 18, 2024

I had some problems following the instructions; I could fix the first 2, but got stuck on the third. You might want to update the instructions related to the first 2 issues. Hopefully someone can help me over the 3rd one.

OS: Ubuntu 19.04

  1. When I ran the following commands:
    pip install -r cvat/requirements/development.txt`
    I got a lot of errors related to installing Pillow:

`writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
running build_ext

The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.

Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html

Following the instructions here helped:
sudo apt install libjpeg8-dev zlib1g-dev

  1. Running "cvat.js debug" in Visual Code gave me:
    "cannot find runtime node on PATH. Make sure to have node installed"

Installing node and npm helped.

  1. Running "cvat.js debug" in Visual Code now gives me:
/usr/bin/node --nolazy --inspect-brk=9230 src/api.js
Debugger listening on ws://127.0.0.1:9230/d24de8ef-920f-4bd3-9a6f-72c1f65532d9
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module 'platform'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at /prog/cvat/cvat-core/src/exceptions.js:11:22
    at Object.<anonymous> (/prog/cvat/cvat-core/src/exceptions.js:272:3)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
Waiting for the debugger to disconnect...
Error: Cannot find module 'platform'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at /prog/cvat/cvat-core/src/exceptions.js:11:22
    at Object.<anonymous> (/prog/cvat/cvat-core/src/exceptions.js:272:3)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)

Any ideas?

PS. cvat/.vscode/launch.json file already existed in Git, this step is unnecessary.

from cvat.

nmanovic avatar nmanovic commented on July 18, 2024

Hi @raunilillemets , we cannot support different OS for development. At the moment internally all engineers are using Ubuntu 18.04 (LTS). If you want to use Ubuntu 19.04 it is necessary to investigate on your own.

@bsekachev , could you please help with cvat.js?

from cvat.

bsekachev avatar bsekachev commented on July 18, 2024

@raunilillemets
Before you can debug cvat-core.js you need to install all node.js dependencies.
cd cvat-core && npm install

from cvat.

raunilillemets avatar raunilillemets commented on July 18, 2024

Thanks @bsekachev.

Well, some of things which I mentioned are likely also relevant on Ubuntu 18.04.
For example, the first issue seems to affect different versions of Ubuntu, as mentioned here.

Anyway, after running npm install in cvat-core, debugging the application now gives me the following error:

Error: No such module: http_parser
    at internalBinding (internal/bootstrap/loaders.js:104:17)
    at _http_client.js:27:24
    at NativeModule.compile (internal/bootstrap/loaders.js:362:7)
    at NativeModule.require (internal/bootstrap/loaders.js:174:18)
    at http.js:25:27
    at NativeModule.compile (internal/bootstrap/loaders.js:362:7)
    at Function.NativeModule.require (internal/bootstrap/loaders.js:174:18)
    at Function.Module._load (internal/modules/cjs/loader.js:517:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)

Any clues?

from cvat.

bsekachev avatar bsekachev commented on July 18, 2024

@raunilillemets
Try this

from cvat.

raunilillemets avatar raunilillemets commented on July 18, 2024

The suggestions there did not help, still had the same issues.

But I noticed that there are 2 really similar profiles:
"cvat.js debug (cvat)"
"debugging (cvat)"

I was using the first one and getting errors; I tried the second one and it seems to work (at least I got into the login page). I will continue using the second one.

from cvat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.