Skip to content

Added a dockerfile for easy running of examples.#199

Merged
chinmayshah99 merged 1 commit intoOpenMined:test-dockerfilesfrom
BenjaminDev:sandbox-examples
Aug 5, 2020
Merged

Added a dockerfile for easy running of examples.#199
chinmayshah99 merged 1 commit intoOpenMined:test-dockerfilesfrom
BenjaminDev:sandbox-examples

Conversation

@BenjaminDev
Copy link
Copy Markdown
Member

@BenjaminDev BenjaminDev commented Jul 22, 2020

Description

Following a slack conversation there was a desire for a simple way to run the PyDP examples. It's a minimal docker image with the example dependencies and jupyter installed.

Summary added to readme:

Docker alternative

To run the examples in a container:

  1. cd PyDP/examples
  2. docker build -t pydp-sandbox:local .
  3. docker run -p 8899:8899 pydp-sandbox:local
  4. Open displayed url in a browser.

Affected Dependencies

None.

How has this been tested?

Tested on my local machine following the examples/readme.md

Checklist

@chinmayshah99
Copy link
Copy Markdown
Member

Can we add this to when we publish it on docker hub?
We can the previous one as dev image and this as sandbox image?

@BenjaminDev
Copy link
Copy Markdown
Member Author

Can we add this to when we publish it on docker hub?
We can the previous one as dev image and this as sandbox image?

Sure that is not a problem 😀

However, asking the user to build the image is a one-liner docker build -t pydp-sandbox:local .. I guess the question is which is easier for the user:
a)
docker build -t pydp-sandbox:local .
docker run -p 8899:8899 pydp-sandbox:local
or
b)
docker run -p 8899:8899 openmined/pydp-sandbox:latest

I am in favor of a) as it's done. If we opt for b) then I'd like to try shrink the image some more. As pandas alone uses ~96MB. I'm sure a few flags like --no-cache will do the trick.

I'll work on b) in the next few days. For now users can be pointed to solution a).

@chinmayshah99
Copy link
Copy Markdown
Member

People using Sandbox will be directly doing docker pull rather than docker build. So we need to minimize the docker file size!

Comment thread examples/Dockerfile
@@ -0,0 +1,18 @@
# Pull base image
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.

What base image do you have in mind?

@chinmayshah99 chinmayshah99 changed the base branch from dev to test-dockerfiles August 5, 2020 13:19
@chinmayshah99 chinmayshah99 merged commit 7000fa5 into OpenMined:test-dockerfiles Aug 5, 2020
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