Closed joshmoore closed 4 years ago
Similar issues had been reported with omero-figure
. Retested with the following
FROM centos:7
RUN yum install -y centos-release-scl \
&& yum install -y rh-python36
RUN /opt/rh/rh-python36/root/bin/python -m venv /py3 && /py3/bin/pip install -U pip tox future wheel restructuredtext-lint
RUN /py3/bin/pip install https://github.com/ome/zeroc-ice-py-manylinux/releases/download/0.1.0/zeroc_ice-3.6.5-cp36-cp36m-manylinux2010_x86_64.whl
RUN /py3/bin/pip install scc
ENV VIRTUAL_ENV=/py3
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN curl -sL https://rpm.nodesource.com/setup | bash
RUN yum install -y git nodejs
RUN npm install -g grunt
RUN python -m venv /tmp/venv1
RUN /tmp/venv1/bin/pip install git+git://github.com/snoopycrimecop/omero-figure.git@py3_ci#egg=omero-figure
RUN virtualenv /tmp/venv2
RUN /tmp/venv2/bin/pip install git+git://github.com/snoopycrimecop/omero-figure.git@py3_ci#egg=omero-figure
Installing the package confirms static templates are only generated in the first virtual environment:
[sbesson@idr2-slot3 venv_fun]$ docker build -t scl_python .
Sending build context to Docker daemon 2.56kB
Step 1/14 : FROM centos:7
---> 67fa590cfc1c
Step 2/14 : RUN yum install -y centos-release-scl && yum install -y rh-python36
---> Using cache
---> 0ebd89c91f09
Step 3/14 : RUN /opt/rh/rh-python36/root/bin/python -m venv /py3 && /py3/bin/pip install -U pip tox future wheel restructuredtext-lint
---> Using cache
---> ebdb77daeb77
Step 4/14 : RUN /py3/bin/pip install https://github.com/ome/zeroc-ice-py-manylinux/releases/download/0.1.0/zeroc_ice-3.6.5-cp36-cp36m-manylinux2010_x86_64.whl
---> Using cache
---> 485d0d7fe97c
Step 5/14 : RUN /py3/bin/pip install scc
---> Using cache
---> 507468d7efaa
Step 6/14 : ENV VIRTUAL_ENV=/py3
---> Using cache
---> 3af88d9a3fb4
Step 7/14 : ENV PATH="$VIRTUAL_ENV/bin:$PATH"
---> Using cache
---> 6346d5ed92c4
Step 8/14 : RUN curl -sL https://rpm.nodesource.com/setup | bash
---> Using cache
---> 3cfabfd42c55
Step 9/14 : RUN yum install -y git nodejs
---> Using cache
---> c5bfb41c0eeb
Step 10/14 : RUN npm install -g grunt
---> Using cache
---> c8cfb218e8e5
Step 11/14 : RUN python -m venv /tmp/venv1
---> Using cache
---> 432482a6271c
Step 12/14 : RUN /tmp/venv1/bin/pip install git+git://github.com/snoopycrimecop/omero-figure.git@py3_ci#egg=omero-figure
---> Using cache
---> 10fbe812c714
Step 13/14 : RUN virtualenv /tmp/venv2
---> Using cache
---> 7c2446e2bf30
Step 14/14 : RUN /tmp/venv2/bin/pip install git+git://github.com/snoopycrimecop/omero-figure.git@py3_ci#egg=omero-figure
---> Using cache
---> 5eeadf96d728
Successfully built 5eeadf96d728
Successfully tagged scl_python:latest
[sbesson@idr2-slot3 venv_fun]$ docker run --rm -it scl_python
[root@3e36b933837e /]# ls /tmp/venv1/lib/python3.6/site-packages/omero_figure/static/figure/
3rdparty css figure.js images templates.js
[root@3e36b933837e /]# ls /tmp/venv2/lib/python3.6/site-packages/omero_figure/static/figure/
3rdparty css images
[root@3e36b933837e /]#
For omero-parade
I was unsuccessful to build it the same way as webpack
failed with SyntaxError: Unexpected token
This issue has been mentioned on Image.sc Forum. There might be relevant details there:
https://forum.image.sc/t/omero-parade-omero-parade-is-not-a-function/38641/1
see: https://github.com/ome/omero-parade/pull/64#issuecomment-555418832
@sbesson suspects this is due to the difference between
virtualenv
andpip -mvenv