From eb007dccb92ffc4a9a81e4f3cb4b4e255466f206 Mon Sep 17 00:00:00 2001 From: William Moore Date: Fri, 8 Sep 2023 10:46:42 +0100 Subject: [PATCH 01/10] update README --- README.rst | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 12d4ae2ab..7718c5f10 100644 --- a/README.rst +++ b/README.rst @@ -163,26 +163,47 @@ with: $ grunt watch + +Local install +************* + +You need an `omero-web` environment. You can either install it locally or use Docker (see below). +To install locally, we recommend that you use `conda` to install `omero-py` as described +at https://github.com/ome/omero-py and then perform a developer install of `omero-figure` +which will include `omero-web`: + +:: + + $ cd omero-figure + $ pip install -e . + +See instructions at https://omero.readthedocs.io/en/latest/developers/Web/Deployment.html +for running the development server. + +Using Docker +************ + It is also possible to develop figure in docker without installing anything locally. The Docker image is built on top of ``openmicroscopy/omero-web-standalone:latest``, so you will have a fully functional omero-web environment while developing ``omero-figure``. -First build the Docker image: +First build the Docker image and specify the server you wish to connect to: :: $ docker build -t figure-devel . + $ export HOST=demo.openmicroscopy.org To develop ``omero-figure`` you can either make all the changes within the Docker container itself by running: :: - $ docker run -ti -e OMEROHOST=YOUR_HOST -p 4080:4080 figure-devel + $ docker run -ti -e OMEROHOST=$HOST -p 4080:4080 figure-devel The preferred option is to mount the repository containing the omero-figure code. Make the changes locally and see the changes in the docker container. To do so, run: - :: - $ docker run -ti -e OMEROHOST=YOUR_HOST -p 4080:4080 -v /PATH_TO_GIT_REPO/omero-figure:/home/figure/src figure-devel + + $ docker run -ti -e OMEROHOST=$HOST -p 4080:4080 -v /PATH_TO_GIT_REPO/omero-figure:/home/figure/src figure-devel After starting the container, run ``docker ps`` in another terminal to find the ID of the container. Then run: From 9c5110ec201e36bc1329476c9c9aea97307d7627 Mon Sep 17 00:00:00 2001 From: William Moore Date: Fri, 8 Sep 2023 12:20:03 +0100 Subject: [PATCH 02/10] Dockerfile to use omero-web-standalone:5.21.0 for Django 3.6 Django 3.6 will be installed as the lastest version that works on python2.6 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f719ae83b..8926eb004 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM openmicroscopy/omero-web-standalone:latest +FROM openmicroscopy/omero-web-standalone:5.21.0 USER root RUN yum -y install npm From 43e4aeec9108dfb2776a7531bca9bcac57a74306 Mon Sep 17 00:00:00 2001 From: William Moore Date: Tue, 12 Sep 2023 10:55:31 +0100 Subject: [PATCH 03/10] Use OMEROHOST env name --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 7718c5f10..7c35f7513 100644 --- a/README.rst +++ b/README.rst @@ -191,19 +191,19 @@ First build the Docker image and specify the server you wish to connect to: :: $ docker build -t figure-devel . - $ export HOST=demo.openmicroscopy.org + $ export OMEROHOST=demo.openmicroscopy.org To develop ``omero-figure`` you can either make all the changes within the Docker container itself by running: :: - $ docker run -ti -e OMEROHOST=$HOST -p 4080:4080 figure-devel + $ docker run -ti -e OMEROHOST -p 4080:4080 figure-devel The preferred option is to mount the repository containing the omero-figure code. Make the changes locally and see the changes in the docker container. To do so, run: :: - $ docker run -ti -e OMEROHOST=$HOST -p 4080:4080 -v /PATH_TO_GIT_REPO/omero-figure:/home/figure/src figure-devel + $ docker run -ti -e OMEROHOST -p 4080:4080 -v /PATH_TO_GIT_REPO/omero-figure:/home/figure/src figure-devel After starting the container, run ``docker ps`` in another terminal to find the ID of the container. Then run: From e264b8b790fad5f406be77663bfd19a74200429c Mon Sep 17 00:00:00 2001 From: William Moore Date: Fri, 8 Dec 2023 14:53:43 +0000 Subject: [PATCH 04/10] Further tweaks to Docker instructions in README. Use omero-web-standalone:latest in Dockerfile --- Dockerfile | 2 +- README.rst | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8926eb004..f719ae83b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM openmicroscopy/omero-web-standalone:5.21.0 +FROM openmicroscopy/omero-web-standalone:latest USER root RUN yum -y install npm diff --git a/README.rst b/README.rst index 7c35f7513..1454ae9b2 100644 --- a/README.rst +++ b/README.rst @@ -184,27 +184,28 @@ Using Docker ************ It is also possible to develop figure in docker without installing anything locally. -The Docker image is built on top of ``openmicroscopy/omero-web-standalone:latest``, so you will have a fully functional -omero-web environment while developing ``omero-figure``. +The Docker image at ``omero-figure/Dockerfile`` is built on top of +`openmicroscopy/omero-web-standalone:latest `_, +so you will have a fully functional omero-web environment while developing ``omero-figure``. First build the Docker image and specify the server you wish to connect to: :: + $ cd omero-figure $ docker build -t figure-devel . $ export OMEROHOST=demo.openmicroscopy.org - -To develop ``omero-figure`` you can either make all the changes within the Docker container itself by running: +The preferred option is to mount the repository containing the omero-figure code. You can make the changes locally and run `grunt watch` +as described above and see changes in the docker container. To do so, run: :: + $ docker run -ti -e OMEROHOST -p 4080:4080 -v /PATH_TO_GIT_REPO/omero-figure:/home/figure/src figure-devel - $ docker run -ti -e OMEROHOST -p 4080:4080 figure-devel -The preferred option is to mount the repository containing the omero-figure code. Make the changes locally and see the changes in the docker container. To do so, run: +Alternatively, to run and develop ``omero-figure`` within the Docker container itself: :: - $ docker run -ti -e OMEROHOST -p 4080:4080 -v /PATH_TO_GIT_REPO/omero-figure:/home/figure/src figure-devel - + $ docker run -ti -e OMEROHOST -p 4080:4080 figure-devel After starting the container, run ``docker ps`` in another terminal to find the ID of the container. Then run: @@ -212,7 +213,8 @@ After starting the container, run ``docker ps`` in another terminal to find the $ docker exec -u 0 -it CONTAINER_ID bash # replace CONTAINER_ID by the correct value $ cd /home/figure/src - $ grunt watch + $ vi src/js/app.js + $ grunt build # or run grunt watch in another terminal From 257f00d14b421e245290528f958ba27a2a4a31bb Mon Sep 17 00:00:00 2001 From: William Moore Date: Thu, 14 Dec 2023 14:48:29 +0000 Subject: [PATCH 05/10] Use FROM openmicroscopy/omero-web-standalone:5.21.0 Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f719ae83b..8926eb004 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM openmicroscopy/omero-web-standalone:latest +FROM openmicroscopy/omero-web-standalone:5.21.0 USER root RUN yum -y install npm From f35ae2efd8a634ac19a36d0c8c8e872d655aed06 Mon Sep 17 00:00:00 2001 From: William Moore Date: Fri, 15 Dec 2023 16:59:22 +0000 Subject: [PATCH 06/10] remove 'without installing anything' --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 1454ae9b2..905da277b 100644 --- a/README.rst +++ b/README.rst @@ -183,7 +183,7 @@ for running the development server. Using Docker ************ -It is also possible to develop figure in docker without installing anything locally. +It is also possible to develop figure in docker without creating a python environment locally. The Docker image at ``omero-figure/Dockerfile`` is built on top of `openmicroscopy/omero-web-standalone:latest `_, so you will have a fully functional omero-web environment while developing ``omero-figure``. From 6b9416e06c5597221ca19bc26efdea973fc278e6 Mon Sep 17 00:00:00 2001 From: William Moore Date: Fri, 15 Dec 2023 17:03:12 +0000 Subject: [PATCH 07/10] Clarify usage of grunt with Docker --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index 905da277b..a861fe5a5 100644 --- a/README.rst +++ b/README.rst @@ -199,6 +199,9 @@ The preferred option is to mount the repository containing the omero-figure code as described above and see changes in the docker container. To do so, run: :: + $ cd /PATH_TO_GIT_REPO/omero-figure + $ grunt build + $ grunt watch # to see updates $ docker run -ti -e OMEROHOST -p 4080:4080 -v /PATH_TO_GIT_REPO/omero-figure:/home/figure/src figure-devel From ec524fb510eaacbd1f608744a7d1ff2392a81cf1 Mon Sep 17 00:00:00 2001 From: William Moore Date: Mon, 18 Dec 2023 10:47:05 +0000 Subject: [PATCH 08/10] More README Docker info tweaks --- README.rst | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index a861fe5a5..7f329422b 100644 --- a/README.rst +++ b/README.rst @@ -177,6 +177,7 @@ which will include `omero-web`: $ cd omero-figure $ pip install -e . +You'll also need to run the `omero config` steps detailed above. See instructions at https://omero.readthedocs.io/en/latest/developers/Web/Deployment.html for running the development server. @@ -186,8 +187,11 @@ Using Docker It is also possible to develop figure in docker without creating a python environment locally. The Docker image at ``omero-figure/Dockerfile`` is built on top of `openmicroscopy/omero-web-standalone:latest `_, -so you will have a fully functional omero-web environment while developing ``omero-figure``. -First build the Docker image and specify the server you wish to connect to: +so you will have a fully functional omero-web environment while developing ``omero-figure``. +This Docker image includes OMERO.figure. You can either replace this with a link to your local ``omero-figure`` repo +or you can use the Docker copy of OMERO.figure for development. + +In either case, start by building the Docker image and specify the server you wish to connect to: :: @@ -195,8 +199,10 @@ First build the Docker image and specify the server you wish to connect to: $ docker build -t figure-devel . $ export OMEROHOST=demo.openmicroscopy.org -The preferred option is to mount the repository containing the omero-figure code. You can make the changes locally and run `grunt watch` -as described above and see changes in the docker container. To do so, run: +To use your local ``omero-figure`` repo for development, you can mount this in place of the Docker ``omero-figure``. +You'll need `npm` and `grunt` installed locally and run `grunt watch` during development as described above. +You can refresh the Docker hosted page at http://localhost:4080/figure to see changes: + :: $ cd /PATH_TO_GIT_REPO/omero-figure From 2659ac005a702fc010edee52a314c7ed4c92021a Mon Sep 17 00:00:00 2001 From: William Moore Date: Wed, 3 Jan 2024 15:28:35 +0000 Subject: [PATCH 09/10] Add note to run docker in a different terminal after grunt watch --- README.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.rst b/README.rst index 7f329422b..5eb2f2672 100644 --- a/README.rst +++ b/README.rst @@ -208,6 +208,8 @@ You can refresh the Docker hosted page at http://localhost:4080/figure to see ch $ cd /PATH_TO_GIT_REPO/omero-figure $ grunt build $ grunt watch # to see updates + + # in a different terminal... $ docker run -ti -e OMEROHOST -p 4080:4080 -v /PATH_TO_GIT_REPO/omero-figure:/home/figure/src figure-devel From a6940e16dedc460e3d231aec3e2a6cb4cc8bc4fa Mon Sep 17 00:00:00 2001 From: William Moore Date: Wed, 3 Jan 2024 18:38:23 +0000 Subject: [PATCH 10/10] Run grunt in different terminal that doesn't have OMEROHOST --- README.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 5eb2f2672..1be748f9a 100644 --- a/README.rst +++ b/README.rst @@ -205,13 +205,12 @@ You can refresh the Docker hosted page at http://localhost:4080/figure to see ch :: - $ cd /PATH_TO_GIT_REPO/omero-figure - $ grunt build - $ grunt watch # to see updates - - # in a different terminal... $ docker run -ti -e OMEROHOST -p 4080:4080 -v /PATH_TO_GIT_REPO/omero-figure:/home/figure/src figure-devel + # in a different terminal, run grunt build or watch... + $ cd /PATH_TO_GIT_REPO/omero-figure + $ grunt build # or grunt watch + Alternatively, to run and develop ``omero-figure`` within the Docker container itself: ::