Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install figure export dependencies by default #71

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

jburel
Copy link
Member

@jburel jburel commented Sep 1, 2022

Install dependencies required to export figure
Figure might not be installed but this should avoid error like ome/docker-example-omero#11

Copy link
Member

@joshmoore joshmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, 👍 for working around errors for the end users, but I worry about the number of places that we have such hard-coded dependencies. I'd really suggest we hammer out "dependency APIs" like pip install omero-figure[server] that we could re-use everywhere.

@jburel
Copy link
Member Author

jburel commented Sep 6, 2022

@joshmoore I agree about the "dependency APIs". This will need to be prioritised.

@pwalczysko
Copy link
Member

pwalczysko commented Jan 17, 2023

I think in order to solve https://forum.image.sc/t/omere-figure-export-pdf-does-not-work/39573/25, we need this PR.

  1. The error in the thread (repeating below) can be reproduced, and it seems clear that you cannot really install new packages on the omero-server container as user omero-server (the default user) - there is no clear way how to become root, the password for root is unknown, all I tried failed).
(venv3) bash-4.2$ pip install "reportlab<3.6"
Collecting reportlab<3.6
  Downloading reportlab-3.5.68-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.6 MB)
     |################################| 2.6 MB 242 kB/s            
Requirement already satisfied: pillow>=4.0.0 in /opt/omero/server/venv3/lib/python3.6/site-packages (from reportlab<3.6) (8.4.0)
Installing collected packages: reportlab
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/opt/omero/server/venv3/lib64/python3.6/site-packages/reportlab-3.5.68.dist-info'
Check the permissions.

Edit: The solution is to start the bash for the container already as root, see https://forum.image.sc/t/omere-figure-export-pdf-does-not-work/39573/27

@jburel
Copy link
Member Author

jburel commented Jan 9, 2024

@pwalczysko no longer required to cap reportlab see https://github.com/ome/omero-figure/blob/master/requirements-server.txt

@pwalczysko
Copy link
Member

git checkout jburel/figure_deps
docker build -t testjm .

#16 86.56     "msg": "Failed to validate GPG signature for pgdg-redhat-repo-42.0-36PGDG.noarch: Public key for pgdg-redhat-repo-latest.noarchtuwairkh.rpm is not installed"
#16 86.56 }
#16 86.56 
#16 86.56 PLAY RECAP *********************************************************************
#16 86.56 localhost                  : ok=26   changed=14   unreachable=0    failed=1    skipped=22   rescued=0    ignored=0

@joshmoore
Copy link
Member

joshmoore commented Jan 10, 2024

see also ome/ansible-role-postgresql-client#14 (review) perhaps?

@pwalczysko
Copy link
Member

pwalczysko commented Jan 10, 2024

@jburel @joshmoore yes, I can see that the build succeeds on the old mac with the amd achitecture. The error #71 (comment) is only happening on the M1.

On the old mac, I am able to run the docker image and connect to the server with insight. Tried to build omero-web in another container and then connect to it, but the omero-web does not see my localhost for some reason.

@pwalczysko
Copy link
Member

Okay, so I have now a test run on my M1 mac:

docker build -t testjm .
cd docker-example-omero
  • Edit the docker-compose.yml file so that you point to the freshly built testjm image.
...
  omeroserver:
    # This container uses the tag for the latest server release of OMERO 5
    # To upgrade to the next major release, increment the major version number
    image: "testjm"
    environment:
...
  • Then just run docker-compose up. Wait for more than 5 mins as the server is slow to start.
  • log in to OMERO.web, and start OMERO.figure.
  • Observe the Figure_to_pdf.py script is missing.
  • Upload it manuall from https://raw.githubusercontent.com/ome/omero-figure/v6.0.1/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py
  • create a figure, add labels with italics and bold.
  • Export the newly created figure.
  • also exec into the server container (built from testjm image) and verify that both reportlab and markdown are installed with latest versions as per pypi

Works fine. Lgtm.

@jburel jburel merged commit 6a04a05 into ome:master Feb 1, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants