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

Updated docker documentation, added .dockerignore #111

Merged
merged 5 commits into from
Jul 23, 2020

Conversation

DreamingRaven
Copy link
Contributor

@DreamingRaven DreamingRaven commented Jul 22, 2020

Description

TLDR: Did not change much, just changed documentation to run docker properly and added .dockerignore for good practice.

.dockerignore is always important to have similarly to .gitignore to
keep in this case the docker context free from unecessary bloat.

Updated the documentation to correct the docker build and run invocation
so that it keep the existing style of using a subdirectory to store the
dockerfiles but puts the context in the current parent directory so the
files can be copied in properly.

Affected Dependencies

None

How has this been tested?

  • Describe the tests that you ran to verify your changes.
    ran the new commands
sudo docker build -t tenseal . -f docker-images/Dockerfile-py38

and

sudo docker run -it tenseal
  • Provide instructions so we can reproduce.
    please run the above two commands or:
sudo docker build -t tenseal . -f docker-images/Dockerfile-py38 && sudo docker run -it tenseal
  • List any relevant details for your test configuration.

Checklist

.dockerignore is always important to have similarly to .gitignore to
keep in this case the docker context free from unecessary bloat.

Updated the documentation to correct the docker build and run invocation
so that it keep the existing style of using a subdirectory to store the
dockerfiles but puts the context in the current parent directory so the
files can be copied in properly.
@DreamingRaven
Copy link
Contributor Author

related to: #72

Copy link
Member

@youben11 youben11 left a comment

Choose a reason for hiding this comment

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

Thanks @DreamingRaven for the PR! I just left a comment regarding .dockerignore, then we can get it merged.

.dockerignore Outdated
Comment on lines 1 to 2
tutorials
third_party
Copy link
Member

Choose a reason for hiding this comment

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

I don't think those should be ignored, someone might want to run the docker image to test the tutorials which he expect to be there, third_party libraries also doesn't need to be downloaded if they are already on the host machine. Some example directories that might need to be ignored are build, bin, dist, lib, and wheels which might be generated in the working directory when installing and building the library.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah ok yeah, I misunderstood what third party was, I will remove that line.

As for tutorials, they are data, image, and jupyter notebook files from the looks of it. However they have no way to run jupyter files in your docker containers, nor does the container expose a port for users to interact with the jupyter server if it was running, so they could play around with these tutorials even if the files were included.
I will remove that line if you still want the files in, but I don't think its reasonable to expect an average user to be able to modify the docker container to be able to run jupyter notebooks since the container does not support it, and they are unnecessary for everyone else to my understanding. Although if you want I will fix those issues so users can interact with the jupyter server at a later date if you like.

Copy link
Member

Choose a reason for hiding this comment

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

True that we doesn't install juputer-notebook in the current images, maybe we should ignore them and build a specific image for that. Then we can leave it as is, but can you add [build, bin, dist, lib, wheels] also, those are the one I know about which are generated when I'm building and playing with the package, I don't want them to be included in the docker image.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah no problem will add them now.

Copy link
Member

Choose a reason for hiding this comment

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

also, please merge master into your branch so that I can merge it back to master

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

Copy link
Member

Choose a reason for hiding this comment

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

Thank you!

@youben11 youben11 merged commit 8a33317 into OpenMined:master Jul 23, 2020
pierreeliseeflory pushed a commit to pierreeliseeflory/TenSEAL that referenced this pull request Apr 27, 2022
* Updated docker documentation, added .dockerignore

.dockerignore is always important to have similarly to .gitignore to
keep in this case the docker context free from unecessary bloat.

Updated the documentation to correct the docker build and run invocation
so that it keep the existing style of using a subdirectory to store the
dockerfiles but puts the context in the current parent directory so the
files can be copied in properly.

* Changed docker build documentation option order

* Re-enabled docker third-party local copy

* .dockerignoring locally built tenseal files

[build, bin, dist, lib, wheels]
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.

None yet

2 participants