Skip to content

Commit

Permalink
Upgrade docker images to torch==1.13.1 (mosaicml#1863)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi-mosaic authored Jan 9, 2023
1 parent a16d85e commit c184d75
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 34 deletions.
3 changes: 3 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,9 @@ ARG PYTHON_VERSION
ARG CUPY_VERSION
ARG CUDA_VERSION

# Allow FFCV to install deprecated 'sklearn' rather than 'scikit-learn'
ENV SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True

RUN CUDA_VERSION_TAG=$(python${PYTHON_VERSION} -c "print('cu' + ''.join('${CUDA_VERSION}'.split('.')[:2]) if '${CUDA_VERSION}' else 'cpu')") && \
MMCV_TORCH_VERSION=$(python -c "print('torch' + ''.join('${PYTORCH_VERSION}'.split('.')[:2]) + '.0')") && \
sudo pip${PYTHON_VERSION} install --no-cache-dir \
Expand Down
4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ To install composer, once inside the image, run `pip install mosaicml`.
<!-- BEGIN_PYTORCH_BUILD_MATRIX -->
| Linux Distro | Flavor | PyTorch Version | CUDA Version | Python Version | Docker Tags |
|----------------|----------|-------------------|----------------|------------------|-------------------------------------------------------------------------------------|
| Ubuntu 20.04 | Base | 1.13.0 | 11.7.1 | 3.10 | `mosaicml/pytorch:latest`, `mosaicml/pytorch:1.13.0_cu117-python3.10-ubuntu20.04` |
| Ubuntu 20.04 | Base | 1.13.0 | cpu | 3.10 | `mosaicml/pytorch:latest_cpu`, `mosaicml/pytorch:1.13.0_cpu-python3.10-ubuntu20.04` |
| Ubuntu 20.04 | Base | 1.13.1 | 11.7.1 | 3.10 | `mosaicml/pytorch:latest`, `mosaicml/pytorch:1.13.1_cu117-python3.10-ubuntu20.04` |
| Ubuntu 20.04 | Base | 1.13.1 | cpu | 3.10 | `mosaicml/pytorch:latest_cpu`, `mosaicml/pytorch:1.13.1_cpu-python3.10-ubuntu20.04` |
| Ubuntu 20.04 | Base | 1.12.1 | 11.6.2 | 3.9 | `mosaicml/pytorch:1.12.1_cu116-python3.9-ubuntu20.04` |
| Ubuntu 20.04 | Base | 1.12.1 | cpu | 3.9 | `mosaicml/pytorch:1.12.1_cpu-python3.9-ubuntu20.04` |
| Ubuntu 20.04 | Base | 1.11.0 | 11.5.2 | 3.8 | `mosaicml/pytorch:1.11.0_cu115-python3.8-ubuntu20.04` |
Expand Down
52 changes: 26 additions & 26 deletions docker/build_matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,80 +62,80 @@
- BASE_IMAGE: nvidia/cuda:11.7.1-cudnn8-devel-ubuntu20.04
CUDA_VERSION: 11.7.1
PYTHON_VERSION: '3.10'
PYTORCH_VERSION: 1.13.0
PYTORCH_VERSION: 1.13.1
TAGS:
- mosaicml/pytorch:1.13.0_cu117-python3.10-ubuntu20.04
- mosaicml/pytorch:1.13.1_cu117-python3.10-ubuntu20.04
- mosaicml/pytorch:latest
TARGET: pytorch_stage
TORCHTEXT_VERSION: 0.14.0
TORCHVISION_VERSION: 0.14.0
TORCHTEXT_VERSION: 0.14.1
TORCHVISION_VERSION: 0.14.1
- BASE_IMAGE: ubuntu:20.04
CUDA_VERSION: ''
HPCX_VERSION: ''
MOFED_VERSION: ''
PYTHON_VERSION: '3.10'
PYTORCH_VERSION: 1.13.0
PYTORCH_VERSION: 1.13.1
TAGS:
- mosaicml/pytorch:1.13.0_cpu-python3.10-ubuntu20.04
- mosaicml/pytorch:1.13.1_cpu-python3.10-ubuntu20.04
- mosaicml/pytorch:latest_cpu
TARGET: pytorch_stage
TORCHTEXT_VERSION: 0.14.0
TORCHVISION_VERSION: 0.14.0
TORCHTEXT_VERSION: 0.14.1
TORCHVISION_VERSION: 0.14.1
- BASE_IMAGE: nvidia/cuda:11.7.1-cudnn8-devel-ubuntu20.04
COMPOSER_INSTALL_COMMAND: mosaicml[all]
CUDA_VERSION: 11.7.1
PYTHON_VERSION: '3.10'
PYTORCH_VERSION: 1.13.0
PYTORCH_VERSION: 1.13.1
TAGS:
- mosaicml/composer:latest
TARGET: composer_stage
TORCHTEXT_VERSION: 0.14.0
TORCHVISION_VERSION: 0.14.0
TORCHTEXT_VERSION: 0.14.1
TORCHVISION_VERSION: 0.14.1
- BASE_IMAGE: ubuntu:20.04
COMPOSER_INSTALL_COMMAND: mosaicml[all]
CUDA_VERSION: ''
PYTHON_VERSION: '3.10'
PYTORCH_VERSION: 1.13.0
PYTORCH_VERSION: 1.13.1
TAGS:
- mosaicml/composer:latest_cpu
TARGET: composer_stage
TORCHTEXT_VERSION: 0.14.0
TORCHVISION_VERSION: 0.14.0
TORCHTEXT_VERSION: 0.14.1
TORCHVISION_VERSION: 0.14.1
- BASE_IMAGE: nvidia/cuda:11.7.1-cudnn8-devel-ubuntu20.04
COMPOSER_INSTALL_COMMAND: mosaicml[all]==0.12.0
CUDA_VERSION: 11.7.1
PYTHON_VERSION: '3.10'
PYTORCH_VERSION: 1.13.0
PYTORCH_VERSION: 1.13.1
TAGS:
- mosaicml/composer:0.12.0
TARGET: composer_stage
TORCHTEXT_VERSION: 0.14.0
TORCHVISION_VERSION: 0.14.0
TORCHTEXT_VERSION: 0.14.1
TORCHVISION_VERSION: 0.14.1
- BASE_IMAGE: ubuntu:20.04
COMPOSER_INSTALL_COMMAND: mosaicml[all]==0.12.0
CUDA_VERSION: ''
PYTHON_VERSION: '3.10'
PYTORCH_VERSION: 1.13.0
PYTORCH_VERSION: 1.13.1
TAGS:
- mosaicml/composer:0.12.0_cpu
TARGET: composer_stage
TORCHTEXT_VERSION: 0.14.0
TORCHVISION_VERSION: 0.14.0
TORCHTEXT_VERSION: 0.14.1
TORCHVISION_VERSION: 0.14.1
- BASE_IMAGE: nvidia/cuda:11.7.1-cudnn8-devel-ubuntu20.04
COMPOSER_INSTALL_COMMAND: mosaicml[all]GIT_COMMIT
CUDA_VERSION: 11.7.1
PYTHON_VERSION: '3.10'
PYTORCH_VERSION: 1.13.0
PYTORCH_VERSION: 1.13.1
TAGS: []
TARGET: composer_stage
TORCHTEXT_VERSION: 0.14.0
TORCHVISION_VERSION: 0.14.0
TORCHTEXT_VERSION: 0.14.1
TORCHVISION_VERSION: 0.14.1
- BASE_IMAGE: ubuntu:20.04
COMPOSER_INSTALL_COMMAND: mosaicml[all]GIT_COMMIT
CUDA_VERSION: ''
PYTHON_VERSION: '3.10'
PYTORCH_VERSION: 1.13.0
PYTORCH_VERSION: 1.13.1
TAGS: []
TARGET: composer_stage
TORCHTEXT_VERSION: 0.14.0
TORCHVISION_VERSION: 0.14.0
TORCHTEXT_VERSION: 0.14.1
TORCHVISION_VERSION: 0.14.1
12 changes: 6 additions & 6 deletions docker/generate_build_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

def _get_pytorch_version(python_version: str):
if python_version == '3.10':
return '1.13.0'
return '1.13.1'
if python_version == '3.9':
return '1.12.1'
if python_version in '3.8':
Expand All @@ -30,8 +30,8 @@ def _get_pytorch_version(python_version: str):


def _get_torchvision_version(pytorch_version: str):
if pytorch_version == '1.13.0':
return '0.14.0'
if pytorch_version == '1.13.1':
return '0.14.1'
if pytorch_version == '1.12.1':
return '0.13.1'
if pytorch_version == '1.11.0':
Expand All @@ -40,8 +40,8 @@ def _get_torchvision_version(pytorch_version: str):


def _get_torchtext_version(pytorch_version: str):
if pytorch_version == '1.13.0':
return '0.14.0'
if pytorch_version == '1.13.1':
return '0.14.1'
if pytorch_version == '1.12.1':
return '0.13.1'
if pytorch_version == '1.11.0':
Expand All @@ -59,7 +59,7 @@ def _get_base_image(cuda_version: str):
def _get_cuda_version(pytorch_version: str, use_cuda: bool):
if not use_cuda:
return ''
if pytorch_version == '1.13.0':
if pytorch_version == '1.13.1':
return '11.7.1'
if pytorch_version == '1.12.1':
return '11.6.2'
Expand Down

0 comments on commit c184d75

Please sign in to comment.