Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile #1580

Merged
merged 13 commits into from
Jul 14, 2021
Merged

Dockerfile #1580

merged 13 commits into from
Jul 14, 2021

Conversation

msalazarcgeo
Copy link
Contributor

PR Description

Dockerfile added

Checklist

  • Unit-test of your feature with Catch.
  • Doxygen documentation of the code completed (classes, methods, types, members...)
  • Documentation module page added or updated.
  • New entry in the ChangeLog.md added.
  • No warning raised in Debug cmake mode (otherwise, Travis C.I. will fail).
  • All continuous integration tests pass (Travis & appveyor)

ChangeLog.md Outdated
- A Dockerfile is added to create a Docker image with the purpose of having a base
to start a development using the DGtal library.
- A Dockerfile is added to create a Docker image to have a base to start development
using the DGtal library.
Copy link
Member

@dcoeurjo dcoeurjo Jun 15, 2021

Choose a reason for hiding this comment

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

Could you please add your name + link to this PR ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 6adb2b0

README.md Outdated Show resolved Hide resolved
@dcoeurjo
Copy link
Member

dcoeurjo commented Jun 15, 2021

thanks @msalazarcgeo for the PR.
Could you also please add a new line in the AUTHORS file?

@msalazarcgeo
Copy link
Contributor Author

msalazarcgeo commented Jun 15, 2021

thanks @msalazarcgeo for the PR.
Could you also please add a new line in the AUTHORS file?

Do yo want me to add my name to it?
I have added in 6adb2b0 I'm not sure if the PR has the changes

@dcoeurjo
Copy link
Member

For the Qt thing (it would be great to have a solution for that), https://forums.docker.com/t/start-a-gui-application-as-root-in-a-ubuntu-container/17069 or http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/ seem to be related...

@dcoeurjo
Copy link
Member

(thx for the AUTHORS)

@msalazarcgeo
Copy link
Contributor Author

msalazarcgeo commented Jun 17, 2021

For the Qt thing (it would be great to have a solution for that), https://forums.docker.com/t/start-a-gui-application-as-root-in-a-ubuntu-container/17069 or http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/ seem to be related...

As I mentioned when I send you the file, I was able to run the GUI on my computer using what you have found (sharing the X-server files). But I couldn't run it without the Nvidia driver since my system has only an Nvidia-GPU as an output video. To connect your system with the docker container using the "digital" user you have to add the following share volumes to the docker run command

-v /tmp/.X11-unix:/tmp/.X11-unix:rw
 --privileged -h $HOSTNAME -v $HOME/.Xauthority:/home/digital/.Xauthority

This would allow the "digital" user to run most of the GUI (that is the case on my system with the Nvidia drivers). I couldn't test on another computer my apologies.

@dcoeurjo
Copy link
Member

Thanks for the comment (I'm not specialist in Docker). I'll try on a Nvidia machine (even if I'm not sure to so why it is nvidia GPU specific but anyway..).

@msalazarcgeo
Copy link
Contributor Author

Thanks for the comment (I'm not specialist in Docker). I'll try on a Nvidia machine (even if I'm not sure to so why it is nvidia GPU specific but anyway..).

If you try this image on a machine with an Nvidia GPU I guess that it will not work. If you want, I can send you the Docker file that I use. The reason why I believe that It won't work is that the Docker image does not have the Nvidia drivers installed.

These parameters

-v /tmp/.X11-unix:/tmp/.X11-unix:rw
 --privileged -h $HOSTNAME -v $HOME/.Xauthority:/home/digital/.Xauthority

don't have anything to do with the fact that have if you have an Nvidia GPU. The parameters are added so that the Docker container has access to the X11 server and the Xauthority file on the system (with the proper credentials) and that the docker container can send the generated image to the X11 server to be displayed (or at least that is what I understand, I'm not an expert neither).

@dcoeurjo
Copy link
Member

dcoeurjo commented Jul 9, 2021

Sorry @msalazarcgeo for the delay. I was in a rush this week and would have more time the next one.

Just a quick question: are all optional deps enabled in your docker image ?

@msalazarcgeo
Copy link
Contributor Author

Sorry @msalazarcgeo for the delay. I was in a rush this week and would have more time the next one.

Just a quick question: are all optional deps enabled in your docker image ?

Don't worry @dcoeurjo.

"Just a quick question: are all optional deps enabled in your docker image ?"

Not all, but I tried to put as many as I could. In the Dockerfile you can see the cmake command to know the ones that are up.

@dcoeurjo
Copy link
Member

I think we're good. thx @msalazarcgeo !
🎉

@dcoeurjo dcoeurjo merged commit 71635d1 into DGtal-team:master Jul 14, 2021
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.

2 participants