Adapting trame/paraview/Docker example so that it can support multiple-users #489
-
Hi, I would like to take the paraview/docker deployment example shown here and adapt it so that it has multi-users enabled like in the trame coockie-cutter example. Unlike, the cookie cutter, however, I would like to stick with the single file application format. So far I have modified the example by adding a /docker directory which contains the scripts and setup directories and also the server directory after the build_image.sh script is executed. My first question is, since the single file application is not installable, should I still be mounting the ROOT_DIR in the build_server.sh script? The second question pertains to the dockerfile. In the current paraview/docker example, the entire directory containing the dockerfile and the SimpleCone.py application gets copied into the image under the /deploy directory. But when enabling multipe-users, the ./server directory gets copied into /deploy/server. So, since the single file application is not installable and doesn't get installed under the deploy directory, where should the SimpleCone.py file be copied into the image? ![]() Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Couple of question and validation question.
|
Beta Was this translation helpful? Give feedback.
-
Following up on this. The simplified deployment works with the kitware/trame image I posted above (which builds paraview within the image) but I am running into a new problem when I try to deploy with a modified image. We are building the kitware/trame image using our own paraview build (as paraview is also used in other parts of our stack). And when I try to deploy the application I am running into this error: Initially, I thought it may have been caused by trying to build the kitware/trame:py3.10-ubuntu22.04 image on a mac (arm) but I get the same error when I build the images with amd64 as well. Do you have any advice? Here is the kitware/trame image we are trying to use: FROM kitware/trame:py3.10-ubuntu22.04 as paraview-trame
RUN apt-get update && apt-get install -y \
libx11-dev \
libosmesa6-dev \
libhdf5-dev \
libgdal-dev \
ffmpeg \
libglvnd-core-dev \
&& rm -rf /var/lib/apt/lists
COPY --from=paraview-build /opt/ssi/paraview-build/bin /opt/paraview/bin
COPY --from=paraview-build /opt/ssi/paraview-build/lib /opt/paraview/lib
COPY --from=paraview-build /opt/ssi/paraview-build/share /opt/paraview/share Here is the build_paraview.sh that we are using to build paraview: #!/bin/bash
if [ -z "$1" ]
then
VER=release
else
VER=$1
fi
mkdir paraview-build
git clone https://gitlab.kitware.com/paraview/paraview.git
cd paraview
git checkout $VER
git submodule update --init --recursive
cd ../paraview-build
cmake -DPARAVIEW_USE_PYTHON=ON \
-DPARAVIEW_ENABLE_GDAL=ON \
-DPARAVIEW_ENABLE_FFMPEG=ON \
-DVTKm_ENABLE_HDF5_IO=ON \
-DPARAVIEW_USE_QT=OFF \
-DPARAVIEW_ENABLE_XDMF2=ON \
-DPARAVIEW_ENABLE_XDMF3=ON \
-DPARAVIEW_ENABLE_VISITBRIDGE=ON \
-DVTK_USE_X=OFF \
-DVTK_OPENGL_HAS_OSMESA=ON \
-DCMAKE_BUILD_TYPE=Release ../paraview
make -j$(nproc) And finally the dockerfile from the directory with the trame application. FROM paraview-trame AS trame
RUN install -d -o trame-user -g trame-user /deploy
ENV TRAME_PARAVIEW=/opt/paraview
ENV TRAME_CLIENT_TYPE=vue3
COPY --chown=trame-user:trame-user . /deploy
RUN /opt/trame/entrypoint.sh build |
Beta Was this translation helpful? Give feedback.
-
Hi Seb, When I am on my m1 mac and am using this dockerfile I can run the paraview/Docker example with no issue. FROM --platform=linux/amd64 kitware/trame:py3.9
RUN install -d -o trame-user -g trame-user /deploy
RUN apt update -y && apt install -y libosmesa6-dev
ARG PV_URL='https://www.paraview.org/files/v5.11/ParaView-5.11.0-osmesa-MPI-Linux-Python3.9-x86_64.tar.gz'
RUN mkdir -p /opt/paraview && cd /opt/paraview && wget -qO- $PV_URL | tar --strip-components=1 -xzv
ENV TRAME_PARAVIEW=/opt/paraview
ENV TRAME_CLIENT_TYPE=vue3
COPY --chown=trame-user:trame-user . /deploy
RUN /opt/trame/entrypoint.sh build However, when I update the setup/requirements.txt to include pandas and then try to import pandas into the example application. I see this error in the container logs:
And this traceback under /deploy/server/logs/launcher/4ffa0d78-0c92-11ef-aa73-0242ac110002.txt:
Do you have any advice on troubleshooting or a workaround? I use pandas to manipulate some environmental data (precipitation, temperature, etc.) for plotting with plotly alongside the paraview visual. |
Beta Was this translation helpful? Give feedback.
ParaView bundle pandas and here you have a conflicting version issue. You could remove the pandas directory from ParaView to maybe grab a newer version, or just assume it will be there thanks to ParaView.