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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,11 @@ docker run --gpus all -it -v $PWD:/workspace/project --network=host --shm-size 1

Available pre-built images are :

- `pytorchignite/base:latest | pytorchignite/hvd-base:latest`
- `pytorchignite/base:latest | pytorchignite/hvd-base:latest | pytorchignite/msdp-apex-base:latest`
- `pytorchignite/apex:latest | pytorchignite/hvd-apex:latest`
- `pytorchignite/vision:latest | pytorchignite/hvd-vision:latest`
- `pytorchignite/vision:latest | pytorchignite/hvd-vision:latest | pytorchignite/msdp-apex-vision:latest`
- `pytorchignite/apex-vision:latest | pytorchignite/hvd-apex-vision:latest`
- `pytorchignite/nlp:latest | pytorchignite/hvd-nlp:latest`
- `pytorchignite/nlp:latest | pytorchignite/hvd-nlp:latest | pytorchignite/msdp-apex-nlp:latest`
- `pytorchignite/apex-nlp:latest | pytorchignite/hvd-apex-nlp:latest`

For more details, see [here](docker).
Expand Down
8 changes: 7 additions & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ Available Tensor Operations:
* `docker pull pytorchignite/hvd-apex-vision:latest`
- [hvd/Dockerfile.hvd-apex-nlp](hvd/Dockerfile.hvd-apex-nlp): base Horovod apex with useful NLP libraries
* `docker pull pytorchignite/hvd-apex-nlp:latest`

- [msdp/Dockerfile.msdp-apex-base](msdp/Dockerfile.msdp-apex-base): multi-stage MSDeepSpeed build with latest Pytorch, Ignite image with minimal dependencies
* `docker pull pytorchignite/msdp-base:latest`
- [msdp/Dockerfile.msdp-apex-vision](msdp/Dockerfile.msdp-apex-vision): base MSDeepSpeed build with useful computer vision libraries
* `docker pull pytorchignite/msdp-vision:latest`
- [msdp/Dockerfile.msdp-apex-nlp](msdp/Dockerfile.msdp-apex-nlp): base MSDeepSpeed build with useful NLP libraries
* `docker pull pytorchignite/msdp-nlp:latest`

## How to use

```bash
Expand Down
70 changes: 70 additions & 0 deletions docker/msdp/Dockerfile.msdp-apex-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Multi-stage build
# 1/Building apex with pytorch:1.6.0-cuda10.1-cudnn7-devel
FROM pytorch/pytorch:1.6.0-cuda10.1-cudnn7-devel AS msdp-builder

ARG ARG_TORCH_CUDA_ARCH_LIST="6.0;6.1;6.2;7.0;7.5"
ENV TORCH_CUDA_ARCH_LIST=$ARG_TORCH_CUDA_ARCH_LIST

# Install git
RUN apt-get update && apt-get install -y --no-install-recommends git && \
rm -rf /var/lib/apt/lists/*

# For pip --use-feature option
RUN python -m pip install --upgrade pip

# From https://github.com/microsoft/DeepSpeed/blob/master/docker/Dockerfile
##############################################################################
# DeepSpeed
##############################################################################
RUN git clone https://github.com/microsoft/DeepSpeed.git /tmp/DeepSpeed
RUN cd /tmp/DeepSpeed && \
git checkout . && \
git checkout master && \
./install.sh --allow_sudo

# Build runtime image
FROM pytorch/pytorch:1.6.0-cuda10.1-cudnn7-runtime

# For building cpufeature wheel
RUN apt-get update && apt-get install -y --no-install-recommends g++ gcc

# Apex
COPY --from=msdp-builder /tmp/DeepSpeed/third_party/apex/dist/apex-*.whl /apex/
RUN cd /apex && \
pip install --no-cache-dir apex-*.whl && \
rm -fr /apex

# MSDeepSpeed
COPY --from=msdp-builder /tmp/DeepSpeed/dist/deepspeed-*.whl /msdp/
RUN cd /msdp && \
pip install --no-cache-dir deepspeed-*.whl && \
rm -fr /msdp

# Install tzdata / git
RUN apt-get update && \
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
apt-get install -y tzdata && \
dpkg-reconfigure --frontend noninteractive tzdata && \
apt-get -y install --no-install-recommends git && \
rm -rf /var/lib/apt/lists/*

# Ignite main dependencies
RUN pip install --upgrade --no-cache-dir pytorch-ignite \
tensorboard \
tqdm
# Checkout Ignite examples only
RUN mkdir -p pytorch-ignite-examples && \
cd pytorch-ignite-examples && \
git init && \
git config core.sparsecheckout true && \
echo examples >> .git/info/sparse-checkout && \
git remote add -f origin https://github.com/pytorch/ignite.git && \
git pull origin master

WORKDIR /workspace

ENTRYPOINT ["/bin/bash"]




10 changes: 10 additions & 0 deletions docker/msdp/Dockerfile.msdp-apex-nlp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Dockerfile.msdp-apex-nlp
FROM pytorchignite/msdp-apex-base:latest

# Ignite NLP dependencies
RUN pip install --upgrade --no-cache-dir torchtext \
transformers \
spacy \
nltk

ENTRYPOINT ["/bin/bash"]
21 changes: 21 additions & 0 deletions docker/msdp/Dockerfile.msdp-apex-vision
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Dockerfile.msdp-apex-vision
FROM pytorchignite/msdp-apex-base:latest

# Install opencv dependencies
RUN apt-get update && \
apt-get -y install --no-install-recommends libglib2.0 \
libsm6 \
libxext6 \
libxrender-dev && \
rm -rf /var/lib/apt/lists/*

# Ignite vision dependencies
RUN pip install --upgrade --no-cache-dir albumentations \
image-dataset-viz \
numpy \
opencv-python \
py_config_runner \
pillow \
"trains>=0.15.0"

ENTRYPOINT ["/bin/bash"]
6 changes: 3 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ Pull a pre-built docker image from `our Docker Hub <https://hub.docker.com/u/pyt

Available pre-built images are :

- ``pytorchignite/base:latest | pytorchignite/hvd-base:latest``
- ``pytorchignite/base:latest | pytorchignite/hvd-base:latest | pytorchignite/msdp-apex-base:latest``
- ``pytorchignite/apex:latest | pytorchignite/hvd-apex:latest``
- ``pytorchignite/vision:latest | pytorchignite/hvd-vision:latest``
- ``pytorchignite/vision:latest | pytorchignite/hvd-vision:latest | pytorchignite/msdp-apex-vision:latest``
- ``pytorchignite/apex-vision:latest | pytorchignite/hvd-apex-vision:latest``
- ``pytorchignite/nlp:latest | pytorchignite/hvd-nlp:latest``
- ``pytorchignite/nlp:latest | pytorchignite/hvd-nlp:latest | pytorchignite/msdp-apex-nlp:latest``
- ``pytorchignite/apex-nlp:latest | pytorchignite/hvd-apex-nlp:latest``

For more details, see `here <https://github.com/pytorch/ignite/tree/master/docker>`_.
Expand Down