Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend contributing.md #18

Closed
ionyshch-prismsl opened this issue Jul 27, 2018 · 8 comments
Closed

Extend contributing.md #18

ionyshch-prismsl opened this issue Jul 27, 2018 · 8 comments
Assignees
Labels
Easy to fix The issue is easy to fix and probably it will be release in a next minor release enhancement New feature or request

Comments

@ionyshch-prismsl
Copy link

Hi,

Could you, please, describe / suggest development / testing steps.
In particular, how would one perform edit - update - run (debug) cycle for both server and client parts.

@bsekachev
Copy link
Member

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

@bsekachev
Copy link
Member

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.

@nmanovic nmanovic added enhancement New feature or request good first issue labels Jul 29, 2018
@nmanovic nmanovic self-assigned this Jul 29, 2018
@nmanovic nmanovic added Easy to fix The issue is easy to fix and probably it will be release in a next minor release and removed good first issue labels Jul 29, 2018
@raunilillemets
Copy link

raunilillemets commented Aug 1, 2019

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:https://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.

@nmanovic
Copy link
Contributor

nmanovic commented Aug 2, 2019

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?

@bsekachev
Copy link
Member

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

@raunilillemets
Copy link

raunilillemets commented Aug 3, 2019

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?

@bsekachev
Copy link
Member

@raunilillemets
Try this

@raunilillemets
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy to fix The issue is easy to fix and probably it will be release in a next minor release enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants