How to enable HistomicsTK web UI
Closed this issue · 20 comments
I have run the docker-compose.yml in devops/dsa and got HistomicUI up and running. BTW I had trouble with Mongo refusing connections, during this part. Maybe put in a note to delete all the contents of devops/dsa/db and devops/dsa/logs if one runs into this issue when starting out.
I pulled dsarchive/histomicstk:latest, connected it to teh dsa_default network, and tried to add it in the slicer_cli_web plugin settings. Nothing in the interface changes, and there is no HistomicsTK endpoint I can reach, nor a link to it via large_image files.
I'de imagine HistomicsTK is served off a girder_worker, as per the diagrams I have seen? I am confused as to how I deploy a web app that includes the annotation tools of HistomicsTK from the command line, preferably from a single call to docker-compose.
Can you set me straight?
That endpoint does not work
I have found that if I add it as a pip package in the dsa_girder dockerfile, create a new user, upload a file, convert it to a large image and then click open in HistomicsUI in the collections modal (while cacheing is disabled) I can get to a HistomicsTK-like interface. But it has no analyses functionality, such as color deconvolution.
You can install different algorithms via the slicer_cli_web plugin settings page. Specifically, you can install HistomicsTK algorithms like so:
specifying the name of the docker image (dsarchive/histomicstk:latest
) and clicking import.
After this finishes, the next time you got to the HistomicsUI interface and load an image, you'll see the Analyses menu which will have the HistomicsTK algorithms.
That isn't working for me.
Started to Load Docker images
Failed to create the Docker Client
Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
Error with job
Could not create the docker client (image name: None )
In error log:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/slicer_cli_web/image_job.py", line 150, in jobPullAndLoad
docker_client = docker.from_env(version='auto')
File "/usr/local/lib/python3.7/site-packages/docker/client.py", line 85, in from_env
timeout=timeout, version=version, **kwargs_from_env(**kwargs)
File "/usr/local/lib/python3.7/site-packages/docker/client.py", line 40, in __init__
self.api = APIClient(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/docker/api/client.py", line 190, in __init__
self._version = self._retrieve_server_version()
File "/usr/local/lib/python3.7/site-packages/docker/api/client.py", line 215, in _retrieve_server_version
'Error while fetching server API version: {0}'.format(e)
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/slicer_cli_web/image_job.py", line 158, in jobPullAndLoad
raise DockerImageError('Could not create the docker client')
slicer_cli_web.models.exceptions.DockerImageError: Could not create the docker client (image name: None )
Additional info:
Request URL: GET /
Query string:
Remote IP: 127.0.0.1
Request UID: [none]
I ran compose with:
DSA_PORT=8080 CURRENT_UID=1000:1000 docker-compose up
Does it work for you if you use the ansible/deploy_docker.py
script rather than docker-compose?
We create docker containers to run algorithms, and it sounds like the user inside the docker container doesn't have the right permissions to access the docker daemon and create a container. The deploy_docker.py
program does some things to try to alleviate these issues -- for instance, the user id within the main dsa container might be in a group that isn't the docker group outside of the container.
Also this inside worker.log:
[2020-05-29 19:16:23,629: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@rabbitmq:5672//: [Errno 111] Connection refused.
Trying again in 4.00 seconds... (2/100)
HistomicsTK loads but the menu item doesn't show up
Did you install the HistomicsTK algorithms via the slicer_cli_web plugin settings page?
yes
Traceback (most recent call last):
File "/opt/slicer_cli_web/slicer_cli_web/image_job.py", line 309, in getCliData
cli_desc = getDockerOutput(name, '%s --%s' % (key, desc_type), client)
File "/opt/slicer_cli_web/slicer_cli_web/image_job.py", line 294, in getDockerOutput
'Attempt to docker run %s %s failed' % (imgName, command), imgName)
slicer_cli_web.models.exceptions.DockerImageError: Attempt to docker run dsarchive/histomicstk:latest NucleiClassification --xml failed (image name: dsarchive/histomicstk:latest )
Additional info:
Request URL: GET /
Query string:
Remote IP: 127.0.0.1
Request UID: [none]
[2020-05-29 20:25:30,336] ERROR: Error getting dsarchive/histomicstk:latest cli data from image
Traceback (most recent call last):
File "/opt/slicer_cli_web/slicer_cli_web/image_job.py", line 309, in getCliData
cli_desc = getDockerOutput(name, '%s --%s' % (key, desc_type), client)
File "/opt/slicer_cli_web/slicer_cli_web/image_job.py", line 294, in getDockerOutput
'Attempt to docker run %s %s failed' % (imgName, command), imgName)
slicer_cli_web.models.exceptions.DockerImageError: Attempt to docker run dsarchive/histomicstk:latest NucleiClassification --xml failed (image name: dsarchive/histomicstk:latest )
Additional info:
Request URL: GET /
Query string:
Remote IP: 127.0.0.1
Request UID: [none]
dsa doesn't like the image
Not sure what else I should try.
I run this:
master ▶ docker run dsarchive/histomicstk:latest NucleiClassification --xml
Traceback (most recent call last):
File "NucleiClassification/NucleiClassification.py", line 7, in <module>
from sklearn.externals import joblib
ImportError: cannot import name 'joblib'
Looks like the container is missing the joblib module
Ran:
docker run dsarchive/histomicstk:latest ComputeNucleiFeatures --xml
ans it worked fine.
Looks like your NucleiClassification module in the latest dsarchive/histomicstk docker container needs fixing.
I submitted an issue on the histomicstk repo
Thanks. scikit-learn "unvendored" a dependency in the last month, causing this problem. HistomicsTK has been updated to handle it, and new a docker image automatically was published. Please confirm if this is now working for you.
Confirmed, it works now.
Hi! Just yesterday I deployed DSA via docker-compose and faced the same issue trying to install HistomicsTK.
Started to Load Docker images
Failed to create the Docker Client
Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
Error with job
Could not create the docker client (image name: None )
Any suggestions?
It sounds like a docker configuration issue. Can you use docker on your machine? Do docker --version
and docker ps -a
both work?
I will do it definitely.
For now I successfully solved it deploying with ansible.