Skip to content

Add conda and pip packages at run time#5

Merged
mrocklin merged 3 commits intomasterfrom
add-conda-pip
Dec 3, 2017
Merged

Add conda and pip packages at run time#5
mrocklin merged 3 commits intomasterfrom
add-conda-pip

Conversation

@mrocklin
Copy link
Copy Markdown
Member

@mrocklin mrocklin commented Dec 2, 2017

@mrocklin
Copy link
Copy Markdown
Member Author

mrocklin commented Dec 2, 2017

I've also changed the Jupyter Dockerfile to install dask directly into the root environment used by the Jupyter notebook server by default.

@mrocklin
Copy link
Copy Markdown
Member Author

mrocklin commented Dec 2, 2017

I had a bit of trouble building the jupyter docker image because of its reliance on base/prepare.sh. @danielfrg how did you build this?

If I copy over the prepare.sh script explicitly then I can do the following and everything works as expected

cd base
docker build -t dask-foo .

cd ../notebook
docker build -t dask-foo-notebook .

docker run --network=host dask-foo dask-scheduler
docker run --network=host -e EXTRA_PIP_PACKAGES="s3fs gcsfs" dask-foo dask-worker localhost:8786
docker run --network=host -e EXTRA_PIP_PACKAGES="s3fs gcsfs" dask-foo dask-worker localhost:8786
docker run --network=host -e EXTRA_PIP_PACKAGES="s3fs gcsfs" dask-foo-notebook

@danielfrg
Copy link
Copy Markdown
Member

I used docker-compose build from the root of the repo to build the images. This will make it use the right docker context for each image.

Comment thread base/Dockerfile

ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
CMD ["bash", "-c", "/usr/bin/prepare.sh && exec dask-scheduler"]
ENTRYPOINT ["/usr/local/bin/dumb-init", "bash", "/usr/bin/prepare.sh"]
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.

Yes, this is definitely the solution to free the CMD that you mention in #4 i didn't do this initially because it would make it impossible to skip the prepare.sh but in general its not a big issue i think.

Comment thread notebook/Dockerfile
cytoolz ipywidgets \
&& conda clean -tipsy
ENV PATH=/opt/conda/envs/dask/bin:$PATH
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager
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.

👍

@mrocklin
Copy link
Copy Markdown
Member Author

mrocklin commented Dec 3, 2017

What's your publication mechanism? Just build locally and push to dockerhub?

@danielfrg
Copy link
Copy Markdown
Member

What's your publication mechanism? Just build locally and push to dockerhub?

Yes

@danielfrg
Copy link
Copy Markdown
Member

danielfrg commented Dec 3, 2017

Actually nevermind, I did setup up the two images on dockerhub so they will get automatically build from new commits on master.

@mrocklin
Copy link
Copy Markdown
Member Author

mrocklin commented Dec 3, 2017

Grand. OK to merge?

@danielfrg
Copy link
Copy Markdown
Member

yes. lgtm

@mrocklin mrocklin merged commit 05f3e52 into master Dec 3, 2017
@mrocklin mrocklin deleted the add-conda-pip branch December 3, 2017 03:14
@mrocklin
Copy link
Copy Markdown
Member Author

mrocklin commented Dec 3, 2017 via email

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