Enable Omero Autotag in omero-web-standalone docker container

Hi again. I’m trying to enable two Omero extensions using the docker compose file from here: https://github.com/ome/docker-example-omero

Since I had some trouble I simplified and currently just try to enable the Auto Tag functionality.

I made the following changes as per the instructions here:

I assumed that I can ignore the pip install step, since that is covered by the Dockerfile for the web container: https://hub.docker.com/r/openmicroscopy/omero-web-standalone/dockerfile

omeroweb:
image: “openmicroscopy/omero-web-standalone:5.7”
environment:
OMEROHOST: omeroserver
CONFIG_omero_web_apps: ‘[ “omero_webtagging_autotag” ]’
CONFIG_omero_web_apps: ‘[“Auto Tag”, “omero_webtagging_autotag/auto_tag_init.js.html”, “auto_tag_panel”]’
networks:
- omero
ports:
- “4080:4080”

However, in the container logs I then see:

Starting OMERO.web
Traceback (most recent call last):
File “manage.py”, line 71, in
execute_from_command_line(sys.argv)
File “/opt/omero/web/venv3/lib64/python3.6/site-packages/django/core/management/init.py”, line 364, in execute_from_command_line
utility.execute()
File “/opt/omero/web/venv3/lib64/python3.6/site-packages/django/core/management/init.py”, line 338, in execute
django.setup()
File “/opt/omero/web/venv3/lib64/python3.6/site-packages/django/init.py”, line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File “/opt/omero/web/venv3/lib64/python3.6/site-packages/django/apps/registry.py”, line 85, in populate
app_config = AppConfig.create(entry)
File “/opt/omero/web/venv3/lib64/python3.6/site-packages/django/apps/config.py”, line 94, in create
module = import_module(entry)
File “/usr/lib64/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘Auto Tag’

What am I missing? Does anyone have an example docker-compose that they’re willing to share?

Ha. Just spotted my mistake. Using the wrong variable should be:
CONFIG_omero_web_ui_center__plugins: ‘[“Auto Tag”, “omero_webtagging_autotag/auto_tag_init.js.html”,

That ‘fixed’ the issue, but now on login I get a popup with:

Url: /static/omero_iviewer/openwith.js?_=1599473510956
TypeError: handler404() got an unexpected keyword argument 'exception'

This looks like it might be related to a missing static/3rdparty/underscore/underscore-min.map resource

Looking a bit further I think that there are a couple of issues here:

CONFIG_omero_web_apps is overridden, so existing settings are lost (which differs from the ‘omero config append’ behaviour.

The ’ and " characters are kind of tricky to deal with in docker-compose, and that results in the
CONFIG_omero_web_ui_center__plugins command creating lines like ‘A’, ‘o’, ‘a’ below the thumbnails dropdown. I.e. it only recognises the first letters as commands, presumably because I specified the escapes for " and ’ wrong.

In some ways it looks like it might be easier to use the .omero config method to get around this. But in my case with Fargate this then requires extra volume mounts, or building my own container.

OK. So I got it working. It was an issue with how environment variables are specified. In the end I used:

  omeroweb:
    image: "openmicroscopy/omero-web-standalone:5.7"
    environment:
            - "OMEROHOST=omeroserver"
            - "CONFIG_omero_web_apps=[ \"omero_webtagging_autotag\", \"omero_webtagging_tagsearch\" ]"
            - "CONFIG_omero_web_ui_center__plugins=[[\"Auto Tag\", \"omero_webtagging_autotag/auto_tag_init.js.html\", \"auto_tag_panel\"]]"
            - "CONFIG_omero_web_ui_top__links=[[\"Tag Search\", \"tagsearch\"]]"
    networks:
      - omero
    ports:
      - "4080:4080"

For the time being I added in some additional environment variables to get back to the ‘default’ behaviour. That’s not super nice, since now I need to keep this in sync with the .omero files from the Dockerfile, but I guess that things there shouldn’t change too often. Super nice, would be if there is an ‘append’ environment variable :smiley: