-
Notifications
You must be signed in to change notification settings - Fork 75
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
optimize size and time using "--no-cache-dir" #70
optimize size and time using "--no-cache-dir" #70
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rajpratik71 - thank you for the contribution - this looks good. As you can see from my comments, you've stumbled upon some very out of date code and we should go ahead and take the opportunity to make the appropriate updates. Thank you.
@@ -3,7 +3,7 @@ | |||
FROM jupyter/all-spark-notebook:dbb9c7b50531 | |||
|
|||
# Install Kernel Gateway | |||
RUN pip install git+https://github.com/jupyter-incubator/kernel_gateway.git | |||
RUN pip install --no-cache-dir git+https://github.com/jupyter-incubator/kernel_gateway.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convert to straight pip install like the others - incubator is no longer required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done as requested
@@ -3,7 +3,7 @@ | |||
FROM jupyter/all-spark-notebook:dbb9c7b50531 | |||
|
|||
# Install Kernel Gateway | |||
RUN pip install git+https://github.com/jupyter-incubator/kernel_gateway.git | |||
RUN pip install --no-cache-dir git+https://github.com/jupyter-incubator/kernel_gateway.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto previous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done as requested
c77f45e
to
f64ee88
Compare
Some version restriction dropped and further Using "--no-cache-dir" flag in pip install ,make sure dowloaded packages by pip don't cached on system . This is a best practise which make sure to fetch ftom repo instead of using local cached one . Further , in case of Docker Containers , by restricing caching , we can reduce image size. In term of stats , it depends upon the number of python packages multiplied by their respective size . e.g for heavy packages with a lot of dependencies it reduce a lot by don't caching pip packages. Further , more detail information can be found at https://medium.com/sciforce/strategies-of-docker-images-optimization-2ca9cc5719b6
f64ee88
to
f15a9a6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thank you!
Using "--no-cache-dir" flag in pip install ,make sure dowloaded packages
by pip don't cached on system . This is a best practise which make sure
to fetch ftom repo instead of using local cached one . Further , in case
of Docker Containers , by restricing caching , we can reduce image size.
In term of stats , it depends upon the number of python packages
multiplied by their respective size . e.g for heavy packages with a lot
of dependencies it reduce a lot by don't caching pip packages.
Further , more detail information can be found at
https://medium.com/sciforce/strategies-of-docker-images-optimization-2ca9cc5719b6