๐Ÿ’พ Installation#

Composer is available with pip:

pip install mosaicml

as well as with Anaconda:

conda install -c mosaicml mosaicml

To include non-core dependencies that are required by some algorithms, callbacks, datasets, or models, the following installation targets are available:

  • pip install 'mosaicml[dev]': Installs development dependencies, which are required for running tests and building documentation.

  • pip install 'mosaicml[deepspeed]': Installs Composer with support for deepspeed.

  • pip install 'mosaicml[nlp]': Installs Composer with support for NLP models and algorithms.

  • pip install 'mosaicml[unet]': Installs Composer with support for Unet.

  • pip install 'mosaicml[timm]': Installs Composer with support for timm.

  • pip install 'mosaicml[wandb]': Installs Composer with support for wandb.

  • pip install 'mosaicml[all]': Install all optional dependencies.

For a developer install, clone directly:

git clone https://github.com/mosaicml/composer.git
cd composer
pip install -e ".[all]"

Note

For fast loading of image data, we highly recommend installing Pillow-SIMD. To install, vanilla pillow must first be uninstalled.

pip uninstall pillow && pip install pillow-simd

Pillow-SIMD is not supported for Apple M1 Macs.

Docker#

To simplify environment setup for Composer, we provide a set of pre-built Docker images.

Composer Images#

The mosaicml/composer images contain all Composer pre-installed with all dependencies for both NLP and Vision models. They are built on top of the mosaicml/pytorch_vision family of images. (See the section on MosaicML PyTorch Images below.)

Note: Only the Dockerimage for most recent version of Composer will be maintained. We recommend using mosaicml/composer:latest or mosaicml/composer:latest_cpu, which will always be up to date.

Composer Version

CUDA Support

Docker Tag

latest

Yes

mosaicml/composer:latest

latest

No

mosaicml/composer:latest_cpu

0.8.2

Yes

mosaicml/composer:0.8.2

0.8.2

No

mosaicml/composer:0.8.2_cpu

Note: For a lightweight installation, we recommended using a MosaicML PyTorch Image and manually installing Composer within the image.

PyTorch Images#

The mosaicml/pytorch images contain PyTorch preinstalled, without Composer. The base flavor contains PyTorch pre-installed; the vision flavor also includes OpenCV, MM Segmentation, and FFCV dependencies. To install composer, once inside the image, run pip install mosaicml.

Linux Distro

Flavor

PyTorch Version

CUDA Version

Python Version

Docker Tags

Ubuntu 20.04

Base

1.11.0

11.3.1

3.9

mosaicml/pytorch:latest, mosaicml/pytorch:1.11.0_cu113-python3.9-ubuntu20.04

Ubuntu 20.04

Base

1.11.0

cpu

3.9

mosaicml/pytorch:latest_cpu, mosaicml/pytorch:1.11.0_cpu-python3.9-ubuntu20.04

Ubuntu 20.04

Base

1.10.2

11.3.1

3.8

mosaicml/pytorch:1.10.2_cu113-python3.8-ubuntu20.04

Ubuntu 20.04

Base

1.10.2

cpu

3.8

mosaicml/pytorch:1.10.2_cpu-python3.8-ubuntu20.04

Ubuntu 20.04

Base

1.9.1

11.1.1

3.7

mosaicml/pytorch:1.9.1_cu111-python3.7-ubuntu20.04

Ubuntu 20.04

Base

1.9.1

cpu

3.7

mosaicml/pytorch:1.9.1_cpu-python3.7-ubuntu20.04

Ubuntu 20.04

Vision

1.11.0

11.3.1

3.9

mosaicml/pytorch_vision:latest, mosaicml/pytorch_vision:1.11.0_cu113-python3.9-ubuntu20.04

Ubuntu 20.04

Vision

1.11.0

cpu

3.9

mosaicml/pytorch_vision:latest_cpu, mosaicml/pytorch_vision:1.11.0_cpu-python3.9-ubuntu20.04

Pillow-SIMD is installed by default in all images.

Pulling Images#

Pre-built images can be pulled from MosaicMLโ€™s DockerHub Repository.

For example:

docker pull mosaicml/composer