Repository navigation
Initial Issues Encountered While Setting Up miqa #111
Description
Activity
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"indevcontainer.jsonto force it to make root the default user.After that
girder buildalmost seems to work...It succeeds in running"webpack:core_lib" (webpack) taskas well aswebpack:core_app,webpack:plugin_jobs,webpack:plugin_autojoin,copy:swagger, andcopy:girder-swagger.It then runs
stylus:swaggerand 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 dependencyI tried running
girder serveand 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'.
Reacted by Dave MackeyAlso, 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.
Reacted by Dave MackeyUpdated instructions (part of #54 and #52) are here:
https://github.com/dzenanz/miqa/blob/with_learning-rebase/development.mdReacted by Dave MackeyThanks @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
TLDR; With a few tweaks I'm up and running. I have not attempted enabling the active learning components at this juncture.
- I had issues with CORS across multiple browsers. Was able to get past it by running Chrome with the
--disable-web-securityflag as described here - Creating a user in girder, logging in with the user to the Vue front-end, creating a collection, adding an assetstore, and mapping to a local directory all worked fine.
- The
Settings --> JSONpath 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. - Attempting to import I ran into a related issue. I had to edit sample.json
data_rootfrom/miqa/sample_datato/workspaces/py/miqa/sample_data, then I was able to import. - It appears I'm up and running at this point although I have not attempted to setup the active learning components as outlined in @dzenanz's updated development doc.
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.
- I had issues with CORS across multiple browsers. Was able to get past it by running Chrome with the
@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.jsonandDockerfile.pip install -e miqa/serverand receive the following warning/error:python -m pip install --upgrade pip.pip install -e miqa/serverreturns the same error without warnings:pip install -e serverand this works. I assume if I had navigated outside of the repo folder and runpip install -e miqa/serverit would have worked...and strictly speaking the instructions indevelopment.mddon'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 buildnext 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) taskthrows an error at 94% asset optimization:This is where I am at the moment. I'll update if I make further progress.
Contents of devcontainer.json:
Contents of Dockerfile