Hello and thanks in advance for your help.
I’m in the process of dockerizing my trame app with the goal of deploying it on a headless, gpu-less VM. I want to use vtk-osmesa for rendering on the cpu.
Briefly, I am unable to install vtk-osmesa. I’ll try to be thorough, but the TLDR is: The vtk documentation says the 9.4 has the vtk-osmesa by default. I don’t see a stable version of vtk 9.4 released. When I try to follow the recommendations to get the vtk-osmesa library from wheels.vtk.org, I’m unable to install it (ERROR: Could not find a version that satisfies the requirement vtk-osmesa (from versions: none)). I’m not sure if this is an issue due to vtk-osmesa being removed in preparation for vtk 9.4, or if I’m referencing it wrong from wheels.vtk.org. All the details of my applications are to follow.
Following relevant documentation, I built my requirements.txt file:
–extra-index-url https://wheels.vtk.org
wheel
trame
trame-vtk
trame-vuetify
vtk-osmesa
Along with my other dependencies. I’m able to build my image from the base image kitware/trame:py3.10, with my /setup folder (containing apps.yml and requirements.txt), and my application files copied to /deploy. Running the docker build command:
docker build --rm -t dockerize_trame .
Succeeds and I can see the image in my docker desktop. Here is my dockerfile:
FROM kitware/trame:py3.10
RUN apt-get update && apt-get install -y
libosmesa6
libosmesa6-dev
mesa-utils
&& apt-get clean
ENV LIBGL_ALWAYS_SOFTWARE=1
COPY --chown=trame-user:trame-user . /deploy
RUN /opt/trame/entrypoint.sh build launcher venv www
However, running the image (docker run -it --rm --p 8080:80 dockerize_trame ) does not start the server successfully:
Starting server…
Starting the wslink launcher at
/deploy/server/venv/bin/python: Error while finding module specification for ‘wslink.launcher’ (ModuleNotFoundError: No module named ‘wslink’)
When I open an interactive terminal in the container, I see that the deploy directory has the necessary folders (apps, data, setup, server). The deploy/server folder has a venv. I activate the venv and try to manually pip install the requirements.txt to see where it fails, lo and behold:
Collecting trame-vuetify (from -r requirements.txt (line 8))
Downloading trame_vuetify-2.7.1-py3-none-any.whl.metadata (5.0 kB)
ERROR: Could not find a version that satisfies the requirement vtk-osmesa (from versions: none)
ERROR: No matching distribution found for vtk-osmesa
I’ve referenced the cookie-cutter repo, trame-app-cone repo, the kitware/trame/docker Readme and kitware/trame/examples/deploy/docker/vtkRendering folder. I’ve also referenced the vtk docs (Additional Python Wheels - VTK documentation) and this discourse update on the vtk-osmesa wheel from 2023 Status Update: VTK Python Wheels. Any clarification on oversights, errors, misunderstandings on my end are deeply appreciated. Thank you!