Skip to content

Commit

Permalink
Add "Dockerfile".
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed May 17, 2020
1 parent d6ced37 commit c064f16
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM python:3.7

RUN curl -sL https://deb.nodesource.com/setup_13.x | bash - \
&& apt-get install -y nodejs

WORKDIR /tmp
COPY ./requirements.txt /tmp
RUN pip install -r requirements.txt \
&& rm /tmp/requirements.txt \
&& python -c "import imageio;imageio.plugins.freeimage.download()" \
&& jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-matplotlib

RUN mkdir -p /home/colour-science/gamut-mapping-ramblings
WORKDIR /home/colour-science/gamut-mapping-ramblings

CMD sh -c 'cd /home/colour-science/gamut-mapping-ramblings && jupyter lab --allow-root --ip=0.0.0.0 --port=8888'
21 changes: 19 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,19 @@ Images courtesy of:
Installation
------------

`Node.js <https://nodejs.org/>`__ is required for the
`Jupyter Lab <https://jupyter.org/>`__ Matplotlib extension.
Docker
~~~~~~

.. code-block:: bash
$ docker build -t colourscience/gamut-mapping-ramblings:latest "."
Pip
~~~

`Node.js <https://nodejs.org/>`__ is required for the
`Jupyter Lab <https://jupyter.org/>`__ Matplotlib extension.

`Pip <https://pip.pypa.io/en/stable/installing/>`__ can be used to install the
main dependencies, assuming you have created and activated a
`Virtual Environment <https://docs.python.org/3/tutorial/venv.html>`__:
Expand All @@ -50,6 +57,9 @@ main dependencies, assuming you have created and activated a
Poetry
~~~~~~

`Node.js <https://nodejs.org/>`__ is required for the
`Jupyter Lab <https://jupyter.org/>`__ Matplotlib extension.

`Poetry <https://python-poetry.org/>`__ can also be used to install the main
dependencies:

Expand All @@ -62,6 +72,13 @@ dependencies:
Usage
-----

Docker
~~~~~~

.. code-block:: bash
$ docker run -v $PWD:/home/colour-science/gamut-mapping-ramblings -p 8888:8888 colourscience/gamut-mapping-ramblings:latest
Pip
~~~

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ wcwidth==0.1.9
webencodings==0.5.1
widgetsnbextension==3.5.1
zipp==1.2.0
-e git+https://github.com/colour-science/colour.git@d9ef0a5aece912cbc18fb2d49b0bbd3c70b2abc0#egg=colour
-e git+https://github.com/colour-science/colour.git@8ed24e8e6b4911148df15a527e03799195228405#egg=colour

0 comments on commit c064f16

Please sign in to comment.