Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ Standards

* Create usage examples for new modules in the examples directory. Add a
``requirements.txt`` file to help users install the packages your examples
require.
require. If your example requires software that is not available in PyPI,
document it in a ``README.rst`` and also update the BrainIAK Dockerfile.

* Remove the output of example Jupyter notebooks before committing them, using
`nbstripout <https://pypi.python.org/pypi/nbstripout>`_.
Expand Down
42 changes: 42 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM ubuntu:16.04

# 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
RUN apt-get update && apt-get install -y \
build-essential \
libgomp1 \
libmpich-dev \
mpich \
python3-dev \
python3-pip \
python3-venv \
\
curl \
unzip \
wget \
\
screen \
\
less \
man \
vim

WORKDIR /mnt

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; \
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

ENTRYPOINT ["/bin/bash", "-l"]
18 changes: 18 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,24 @@ Therefore, if you have a problem with an older version, please upgrade to the
latest version before creating an issue on GitHub.


Docker
======

You can also test BrainIAK without installing it using Docker::

docker pull brainiak/brainiak
docker run -it -p 8888:8888 -v brainiak:/mnt --name demo brainiak/brainiak

To run Jupyter notebooks in the running container, try::

python3 -m notebook --allow-root --no-browser --ip=0.0.0.0

Then visit http://localhost:8888 in your browser and enter the token. Protip:
run ``screen`` before running the notebook command.

Note that we do not support MPI execution using Docker containers and that performance will not be optimal.


Support
=======

Expand Down
1 change: 1 addition & 0 deletions docs/newsfragments/272.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added a Docker image for testing BrainIAK without installing.