Skip to content

Commit

Permalink
Added docker (lululxvi#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
pescap authored Feb 4, 2022
1 parent e4b48e0 commit 96982ed
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM horovod/horovod:master
LABEL description="DeepXDE with Tensorflow PyTorch and GPU support"

COPY requirements.txt /root
WORKDIR /root
RUN /usr/bin/python -m pip install --upgrade pip
RUN pip3 install -r requirements.txt
RUN apt-get update && apt-get install -y --no-install-recommends imagemagick=8:6.9.7.4+dfsg-16ubuntu6.12 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
EXPOSE 8888/tcp
ENV SHELL /bin/bash
ENTRYPOINT ["jupyter", "notebook", "--ip", "0.0.0.0", "--no-browser", "--allow-root"]
11 changes: 11 additions & 0 deletions docker/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ipython
scipy
sklearn
matplotlib
scikit-optimize
tensorflow-probability==0.12.2
jupyter
jupyterlab
notebook
pandas
deepxde
25 changes: 25 additions & 0 deletions docs/user/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,31 @@ Then, you can install DeepXDE itself.
- `scikit-optimize <https://scikit-optimize.github.io>`_
- `SciPy <https://www.scipy.org/>`_


Docker
------

The `DeepXDE Docker images <https://hub.docker.com/r/pescapil/deepxde>`_ are already configured to run DeepXDE with the GPU support.

You need first to install `NVIDIA Docker <https://github.com/NVIDIA/nvidia-docker>`_.

You can run a Jupyter Notebook environment with GPU-enabled stable DeepXDE using::

$ nvidia-docker run -v $(pwd):/root/shared -w "/root/shared" -p 8888:8888 pescapil/deepxde:latest

Use ``nvidia-docker`` (resp. ``docker``) command to enable GPU (resp. CPU)-based DeepXDE.

The corresponding `Dockerfile <https://github.com/lululxvi/deepxde/tree/master/docker/Dockerfile>`_ is based on ``horovod/horovod`` and comes with TensorFlow 2.x and PyTorch. To build the image yourself, you can run::

$ git clone https://github.com/lululxvi/deepxde.git
$ cd deepxde/docker
$ docker build -f Dockerfile . -t mydeepxde

and then run your own ``mydeepxde`` image via::

$ nvidia-docker run -v $(pwd):/root/shared -w "/root/shared" -p 8888:8888 mydeepxde


Working with different backends
-------------------------------

Expand Down

0 comments on commit 96982ed

Please sign in to comment.