Skip to content

feat: add a Dockerfile#23

Draft
Jo-Byr wants to merge 1 commit intomainfrom
docker
Draft

feat: add a Dockerfile#23
Jo-Byr wants to merge 1 commit intomainfrom
docker

Conversation

@Jo-Byr
Copy link
Copy Markdown
Collaborator

@Jo-Byr Jo-Byr commented Aug 8, 2025

No description provided.

@Jo-Byr Jo-Byr self-assigned this Aug 8, 2025
@finetjul
Copy link
Copy Markdown
Member

Can you please add a non WSL dockerfile ?

Related to: #17

docker/README Outdated
Comment on lines +11 to +17
- To use EGL:

`docker run -p 8080:8080 -it --gpus all -e VTK_DEFAULT_OPENGL_WINDOW=vtkEGLRenderWindow -e LD_LIBRARY_PATH=/usr/lib/wsl/lib -v /usr/lib/wsl:/usr/lib/wsl trame-slicer-wsl`

- To use X server:

`docker run -p 8080:8080 -it --gpus all -e DISPLAY -e LD_LIBRARY_PATH=/usr/lib/wsl/lib -v /usr/lib/wsl:/usr/lib/wsl -v /tmp/.X11-unix:/tmp/.X11-unix trame-slicer-wsl`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

probably missing some host requirements here, I can't get it to work on my windows 10 WSL. It's always using llvmpipe. I have nvidia drivers installed and able to use my GPU inside WSL.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The image was updated recently, could you test again ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'll try when I have some time but do not wait for me if you need to merge

@Thibault-Pelletier
Copy link
Copy Markdown
Collaborator

Thx for the PR!
I will let @bourdaisj make his review as docker files are completly outside my area of expertise.

Regarding the PR, could you amend the commit to replace feat by doc as we don't want to trigger a new minor release for this dockerfile? 🙏

@Jo-Byr Jo-Byr force-pushed the docker branch 2 times, most recently from 6d4af77 to 3d29699 Compare September 2, 2025 14:00
@Jo-Byr Jo-Byr changed the title feat: add a WSL Dockerfile feat: add a Dockerfile Sep 3, 2025
@Jo-Byr Jo-Byr marked this pull request as draft September 3, 2025 06:41
@Thibault-Pelletier Thibault-Pelletier force-pushed the main branch 3 times, most recently from 7060d84 to 86fd515 Compare November 26, 2025 15:10
@Thibault-Pelletier Thibault-Pelletier force-pushed the main branch 2 times, most recently from e94ad01 to b07b3d4 Compare December 12, 2025 14:59
@Jo-Byr
Copy link
Copy Markdown
Collaborator Author

Jo-Byr commented Jan 26, 2026

I rebased the branch and modified the approach.

It seems to work correctly on both WSL and Linux, but it seems the X / EGL toggle does nor work as intended.


The run command depends on the image:

- WSL
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

how about adding instructions for CPU (Mesa) rendering.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Should I also remove X render instructions as discussed ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For X, the thing is that you manage to get it to work in another project, so the problem does not seem to come from the docker image. Maybe you can document something like that: the docker image is known to work with a X server, yet no instruction is provided)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I added MESA instructions and a warning for X server on WSL. I was able to make it work on Linux.


- To use MESA: After removing NVIDIA_DRIVER_CAPABILITIES and NVIDIA_VISIBLE_DEVICES declarations from the Dockerfile

`docker run -p 8080:8080 -it trame-slicer`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why not passing -e VTK_DEFAULT_OPENGL_WINDOW=vtkOSOpenGLRenderWindow


- To use X server:

`docker run -it -p 8080:8080 --runtime=nvidia -v {path to your Xauthority}:/root/.Xauthority -e DISPLAY=$DISPLAY --net host trame-slicer`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why not passing -e VTK_DEFAULT_OPENGL_WINDOW=vtkXOpenGLRenderWindow

@Thibault-Pelletier
Copy link
Copy Markdown
Collaborator

trame-slicer can now be fully pip installed in [standalone] mode.

@Jo-Byr could you rebase the docker image on main and update for Python 3.13 and using pip install command instead?

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.

4 participants