DigitalSlideArchive / digital_slide_archive

The official deployment of the Digital Slide Archive and HistomicsTK.
https://digitalslidearchive.github.io
Apache License 2.0
108 stars 49 forks source link

How to alter UI of DSA? #218

Closed Shao-YJ closed 2 years ago

Shao-YJ commented 2 years ago

I want make a better UI of DSA Web, but DSA is deployed in Docker.

I had do this of my DSA. $ cd digital_slide_archive $ export HISTOMICS_TESTDATA_FOLDER=~/data/histomicsTK $ mkdir -p $HISTOMICS_TESTDATA_FOLDER $ devops/deploy.sh start --build

but I don't what it have done.

So how can I alter the UI of DSA. Do I must modify it in Docker container?

manthey commented 2 years ago

The usual process (and the scripts in the devops directory) optionally mount one or more directories into the docker containers. You can then edit the files outside of the docker.

If you are editing existing python files, the system will restart automatically on change. If you are editing existing javascript files, you can run devops/build.sh --watch-plugin (name of plugin you are editing). This is just running girder build --dev ... inside the docker. If you add python files, you may need to restart the system, either by doing a docker restart dsa_girder or by touching a python file that is in use. If you add javascript files, you'll need to run devops/build.sh without the --watch-plugin option to ensure it finds the new files.

Shao-YJ commented 2 years ago

But when I use devops/build.sh --watch-plugin HistomicsUI code to histomicsUI plugin. I will meet a mistake.

/home/ubuntu/.virtualenvs/girder/lib/python3.8/site-packages/pkg_resources/init.py:123: PkgResourcesDeprecationWarning: development is an invalid version and will not be supported in a future release warnings.warn( npm WARN deprecated extract-text-webpack-plugin@2.1.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. npm WARN deprecated uglify-es@3.3.9: support for ECMAScript is superseded by uglify-js as of v3.13.0 npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN deprecated svgo@0.7.2: This SVGO version is no longer supported. Upgrade to v2.x.x. npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash. npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated swagger-ui@2.2.10: No longer maintained, please upgrade to swagger-ui@3. npm WARN deprecated core-js@2.3.0: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. npm ERR! code 128 npm ERR! Command failed: git clone --mirror -q https://github.com/rii-mango/JPEGLosslessDecoderJS.git /home/ubuntu/.npm/_cacache/tmp/git-clone-866b7569/.git npm ERR! warning: templates not found in /tmp/pacote-git-template-tmp/git-clone-e9a93b29 npm ERR! fatal: unable to access 'https://github.com/rii-mango/JPEGLosslessDecoderJS.git/': GnuTLS recv error (-110): The TLS connection was non-properly terminated. npm ERR! npm ERR! A complete log of this run can be found in: npm ERR! /home/ubuntu/.npm/_logs/2022-06-19T10_40_12_298Z-debug.log Traceback (most recent call last): File "/home/ubuntu/.virtualenvs/girder/bin/girder", line 33, in sys.exit(load_entry_point('girder', 'console_scripts', 'girder')()) File "/home/ubuntu/.virtualenvs/girder/lib/python3.8/site-packages/click/core.py", line 1130, in call return self.main(args, kwargs) File "/home/ubuntu/.virtualenvs/girder/lib/python3.8/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/home/ubuntu/.virtualenvs/girder/lib/python3.8/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/ubuntu/.virtualenvs/girder/lib/python3.8/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/ubuntu/.virtualenvs/girder/lib/python3.8/site-packages/click/core.py", line 760, in invoke return __callback(args, **kwargs) File "/opt/girder/girder/cli/build.py", line 83, in main check_call(installCommand, cwd=staging) File "/usr/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['npm', 'install']' returned non-zero exit status 1.

why is this occur?

manthey commented 2 years ago

What version of node and npm are you using? Girder still depends on a package that requires node <= 12, so this might be a node version issue.

Shao-YJ commented 2 years ago

my node version is 12,and i reinstall it in version 10,but it is alse happen this issue. Do you have other advice?

manthey commented 2 years ago

Your error message looks like npm isn't reaching github properly. I really don't know how that occurs unless you have network issue due to connectivity, proxy, or something else.

Shao-YJ commented 2 years ago

OK,I use a git proxy to solve the proble. Thank you for your advise.

Now I want use my algorithm to replace the algorithm in histomicsTK to improve accuracy of cell recognition.How can I alter the algorithm.

manthey commented 2 years ago

See the code in the https://github.com/DigitalSlideArchive/HistomicsTK repo for some algorithms. These can be replaced or modified and a new docker file with different algorithms can be created to run alternatives. See also https://github.com/girder/slicer_cli_web for some much simpler examples for dockers that run algorithms.

I'll close this issue. Open a new one if needed.