Open davidshq opened 3 years ago
I remember that some component didn't work with Python newer than 3.7 (I originally tried it with 3.8).
If you are interested in doing development on Windows, I could update the readme with my Windows-specific notes soon (rather than later).
[re windows steps: If the notes are for using Windows and WSL2, seeing them would be great! I'm trying to avoid installing directly onto my Windows OS.]
I started fresh with a copy of Python 3.6 and ran into the same problem. The issue was that the user VSC automatically creates for use with the machine is not root and does not have permissions to create/edit files in /usr/local/share
. I temporarily commented out the line "remoteUser": "vscode"
in devcontainer.json
to force it to make root the default user.
After that girder build
almost seems to work...It succeeds in running "webpack:core_lib" (webpack) task
as well as webpack:core_app
, webpack:plugin_jobs
, webpack:plugin_autojoin
, copy:swagger
, and copy:girder-swagger
.
It then runs stylus:swagger
and reports "1 file created" before throwing several warnings and finishing with "Done.":
Running "stylus:swagger" (stylus) task
>> 1 file created.
(node:7697) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:7697) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:7697) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:7697) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:7697) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:7697) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
I tried running girder serve
and it starts up okay but as soon as someone (me) hits http://127.0.0.1:8080 it throws an error because it can't find /usr/local/share/girder/static/miqa/index.html
:
[07/May/2021:19:25:23] HTTP
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/cherrypy/_cprequest.py", line 638, in respond
self._do_respond(path_info)
File "/usr/local/lib/python3.6/site-packages/cherrypy/_cprequest.py", line 697, in _do_respond
response.body = self.handler()
File "/usr/local/lib/python3.6/site-packages/cherrypy/lib/encoding.py", line 219, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/cherrypy/_cpdispatch.py", line 54, in __call__
return self.callable(*self.args, **self.kwargs)
File "/workspaces/py/miqa/server/miqa_server/client_webroot.py", line 17, in GET
file = open(os.path.join(constants.STATIC_ROOT_DIR, 'miqa', "index.html"), "r")
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/share/girder/static/miqa/index.html'
[07/May/2021:19:25:23] HTTP
Request Headers:
Remote-Addr: 127.0.0.1
HOST: 127.0.0.1:8080
CONNECTION: keep-alive
SEC-CH-UA: " Not A;Brand";v="99", "Chromium";v="90", "Microsoft Edge";v="90"
SEC-CH-UA-MOBILE: ?0
DNT: 1
UPGRADE-INSECURE-REQUESTS: 1
USER-AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36 Edg/90.0.818.51
ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
SEC-FETCH-SITE: none
SEC-FETCH-MODE: navigate
SEC-FETCH-USER: ?1
SEC-FETCH-DEST: document
ACCEPT-ENCODING: gzip, deflate, br
ACCEPT-LANGUAGE: en-US,en;q=0.9
127.0.0.1 - - [07/May/2021:19:25:23] "GET / HTTP/1.1" 500 513 "" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36 Edg/90.0.818.51"
127.0.0.1 - - [07/May/2021:19:25:23] "GET /favicon.ico HTTP/1.1" 405 257 "http://127.0.0.1:8080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36 Edg/90.0.818.51"
I've verified the file does not exist at the given path but am not sure yet why it isn't being created...
In this application, girder is running only as a backend server and is not hosting the web page. Please try http://127.0.0.1:8080/girder to see if you see Girder's internal UI. The MIQA GUI is run separately using npm or yarn serving from the mica/client directory. Depending on your browser CORS settings you might have issues connecting between client and server since the ports are different. Please cd into the 'client' directory and do something similar to 'yarn install' and 'yarn serve'.
Also, girder uses mongoDB for internal local storage. You will need a mongoDB server running for 'girder serve' to be successful. In my experience, girder will usually stop within a few seconds if it cannot find a mongoDB instance to use for internal state management. This is probably not in the documentation.
Updated instructions (part of #54 and #52) are here: https://github.com/dzenanz/miqa/blob/with_learning-rebase/development.md
Thanks @curtislisle, once I went to /girder it worked. girder does stop running after a few seconds if mongoDB is not available, not sure about the docs.
Thanks @dzenanz, I'll take a look at these too
@curtislisle, @dzenanz:
TLDR; With a few tweaks I'm up and running. I have not attempted enabling the active learning components at this juncture.
--disable-web-security
flag as described hereSettings --> JSON
path config took me a little while. In VSC one's code resides at /workspaces/rest_of/path
. In my instance this meant changing the default ~/miqa/sample_data/sample.json
(and export path similarly) to /workspaces/py/miqa/sample_data/sample.json
. I was able to save the path after doing so.data_root
from /miqa/sample_data
to /workspaces/py/miqa/sample_data
, then I was able to import.I've written this all out in this issue in case there is an opportunity for me (or someone) to smooth over a few of the bumps I encountered.
@davidshq , glad to hear you have the system built and running. The issues you encountered largely reflect on our incomplete developer documentation. Thanks for the comments and testing.
Just wanted to share the issues I ran into as I began setting up miqa:
code .
). This launches VS Code from within WSL.devcontainer.json
andDockerfile
.pip install -e miqa/server
and receive the following warning/error:python -m pip install --upgrade pip
.pip install -e miqa/server
returns the same error without warnings:pip install -e server
and this works. I assume if I had navigated outside of the repo folder and runpip install -e miqa/server
it would have worked...and strictly speaking the instructions indevelopment.md
don't say to enter the repo, may be worth adding verbiage noting that if one does enter the repo one needs to removemiqa/
from the pip command.girder build
, the first steps - installing npm packages run fine. As does@girder/meta-build@ build /home/vscode/.local/lib/python3.9/site-packages/girder/web_client
.girder build
next attempts to rungrunt "--girder-version=3.1.4" "--static-path=/usr/local/share/girder/static" --"static-public-path=/static" "--no-progress=false" "--env=prod"
and while running the"webpack:core_lib" (webpack) task
throws an error at 94% asset optimization:Aborted due to warnings. npm ERR! code ELIFECYCLE npm ERR! errno 3 npm ERR! @girder/meta-build@ build:
grunt "--girder-version=3.1.4" "--static-path=/usr/local/share/girder/static" "--static-public-path=/static" "--no-progress=false" "--env=prod"
npm ERR! Exit status 3 npm ERR! npm ERR! Failed at the @girder/meta-build@ build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! /home/vscode/.npm/_logs/2021-05-07T16_08_20_911Z-debug.log Traceback (most recent call last): File "/home/vscode/.local/bin/girder", line 8, in
sys.exit(main())
File "/home/vscode/.local/lib/python3.9/site-packages/click/core.py", line 829, in call
return self.main(args, kwargs)
File "/home/vscode/.local/lib/python3.9/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/vscode/.local/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/vscode/.local/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/home/vscode/.local/lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(args, **kwargs)
File "/home/vscode/.local/lib/python3.9/site-packages/girder/cli/build.py", line 104, in main
check_call(buildCommand, cwd=staging)
File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['npm', 'run', 'build', '--', '--girder-version=3.1.4',
'--static-path=/usr/local/share/girder/static', '--static-public-path=/static', '--no-progress=false',
'--env=prod']' returned non-zero exit status 3.
Contents of Dockerfile