-
Notifications
You must be signed in to change notification settings - Fork 142
dev: Add brainiak-tutorials to Dockerfile #425
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ | |
| *.pkl | ||
|
|
||
| data | ||
| tutorials | ||
|
|
||
| brainiak.egg-info | ||
| build | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,11 @@ | ||
| FROM ubuntu:16.04 | ||
| FROM ubuntu:18.04 | ||
|
|
||
| ARG DEBIAN_FRONTEND=noninteractive | ||
| # Group 1 must be synced with README | ||
| # Group 2 must be synced with requirements for examples | ||
| # Group 3 must be synced with rest of Dockerfile | ||
| # Group 4 is optional | ||
| # Group 5 must be synced with requirements for tutorials | ||
| RUN apt-get update && apt-get install -y \ | ||
| build-essential \ | ||
| libgomp1 \ | ||
|
|
@@ -23,22 +25,27 @@ RUN apt-get update && apt-get install -y \ | |
| \ | ||
| less \ | ||
| man \ | ||
| vim | ||
| vim \ | ||
| \ | ||
| libssl-dev | ||
|
|
||
| COPY dist/brainiak-* /mnt/brainiak | ||
|
|
||
| WORKDIR /mnt/brainiak | ||
|
|
||
| WORKDIR /mnt | ||
| COPY tutorials/tutorials tutorials | ||
|
|
||
| RUN set -e \ | ||
| && python3 -m pip install --user -U pip \ | ||
| && python3 -m pip install -U brainiak \ | ||
| && python3 -m pip download --no-deps --no-binary :all: brainiak \ | ||
| && export BRAINIAK_VERSION=$(basename brainiak-* .tar.gz | cut -b 10-) \ | ||
| && tar -xf brainiak-*.tar.gz \ | ||
| && for example in brainiak-$BRAINIAK_VERSION/examples/*/requirements.txt; \ | ||
| && python3 -m pip install --user -U "pip<10" \ | ||
| && python3 -m pip install --user -U . \ | ||
| && python3 -m pip install --user -U -r tutorials/requirements.txt \ | ||
| && for example in examples/*/requirements.txt; \ | ||
| do python3 -m pip install --user -U -r $example ; done | ||
|
|
||
| RUN echo PATH=\"\$HOME/.local/bin:\$PATH\" >> $HOME/.profile \ | ||
| && echo "shell -bash" >> ~/.screenrc | ||
|
|
||
| EXPOSE 8888 | ||
| EXPOSE 8899 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Didn't we want to stay with port 8888 because that is what Jupiter prints as the URL when it starts? I remember users getting confused by that.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is consistent with the script that we run automatically, so Jupyter will print the right thing: |
||
|
|
||
| ENTRYPOINT ["/bin/bash", "-l"] | ||
| CMD ["tutorials/run_jupyter_docker.sh"] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want the tutorials to automatically start? Seems like most of the time the user of brainiak docker will not be using the tutorials.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the tutorials are a great way to start for all users of BrainIAK. At the same time, we should add instructions to the website about starting a shell (hint: add |
||
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.
For clarity I'd prefer to have WORKDIR /mnt and
&& python3 -m pip install --user -U brainiak
&& python3 -m pip install --user -U -r brainiak/tutorials/requirements.txt
&& for example in brainiak/examples/*/requirements.txt; \
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.
From the user perspective, I think WORKDIR should be
brainiak, so users can easily find the tutorials and examples. As for clarity in the Dockerfile for developers, I think developers are used to working inside thebrainiakdirectory.