๐พ 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 fordeepspeed
.pip install 'mosaicml[nlp]'
: Installs Composer with support for NLP models and algorithms.pip install 'mosaicml[wandb]'
: Installs Composer with support forwandb
.pip install 'mosaicml[comet_ml]'
: Installs Composer with support forcomet_ml
.pip install 'mosaicml[neptune]'
: Installs Composer with support forneptune
.pip install 'mosaicml[tensorboard]'
: Installs Composer with support fortensorboard
.pip install 'mosaicml[streaming]'
: Installs Composer with support for streaming.pip install 'mosaicml[mlflow]'
: Installs Composer with support formlflow
.pip install 'mosaicml[oci]'
: Installs Composer with support foroci
.pip install 'mosaicml[onnx]'
: Installs Composer with support foronnx
.pip install 'mosaicml[coco]'
: Installs Composer with support forcoco
.pip install 'mosaicml[libcloud]'
: Installs Composer with support forlibcloud
.pip install 'mosaicml[all]'
: Installs 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 Composer pre-installed with
all dependencies for both NLP and Vision models. They are built on top of the
mosaicml/pytorch
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 |
---|---|---|
0.27.0 |
Yes |
|
0.27.0 |
No |
|
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.
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 |
2.5.1 |
12.4.1 (Infiniband) |
3.11 |
|
Ubuntu 20.04 |
Base |
2.5.1 |
12.4.1 (EFA) |
3.11 |
|
Ubuntu 20.04 |
Base |
2.5.1 |
cpu |
3.11 |
|
Ubuntu 20.04 |
Base |
2.4.1 |
12.4.1 (Infiniband) |
3.11 |
|
Ubuntu 20.04 |
Base |
2.4.1 |
12.4.1 (EFA) |
3.11 |
|
Ubuntu 20.04 |
Base |
2.4.1 |
cpu |
3.11 |
|
Ubuntu 20.04 |
Base |
2.3.1 |
12.1.1 (Infiniband) |
3.11 |
|
Ubuntu 20.04 |
Base |
2.3.1 |
12.1.1 (EFA) |
3.11 |
|
Ubuntu 20.04 |
Base |
2.3.1 |
cpu |
3.11 |
|
Note: The mosaicml/pytorch:latest
, mosaicml/pytorch:latest_cpu
, and mosaicml/pytorch:latest-aws
images will always point to the stable version of PyTorch which we have battle tested and recommend for production use. The latest
label
may not point to an image with the most recent release of PyTorch, however we do update our images frequently so that newer versions can
be proven out.
Note: Only the images listed in the table above are maintained. All other images in the DockerHub repository have been deprecated and are kept for legacy support. Legacy images might be cleaned up without notice so itโs best to migrate to the latest image or re-tag and maintain a private copy if you wish to continue using legacy images.
Pulling Images#
Pre-built images can be pulled from MosaicMLโs DockerHub Repository.
For example:
docker pull mosaicml/composer