From 0cd8679e8fbeb8463bc520829110043466150b8e Mon Sep 17 00:00:00 2001 From: AmirMasoud Nourollah <61701369+Nourollah@users.noreply.github.com> Date: Sun, 3 Apr 2022 23:40:50 +0430 Subject: [PATCH 1/6] Update Dockerfile Compatible with the latest version of MMCV and PyTorch for compatibility with Python3.10 --- docker/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 6f9acacb95..7115fb8a3f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,7 @@ -ARG PYTORCH="1.6.0" -ARG CUDA="10.1" -ARG CUDNN="7" -ARG MMCV="1.3.13" +ARG PYTORCH="1.11.0" +ARG CUDA="11.3" +ARG CUDNN="8" +ARG MMCV="1.4.8" FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel From 883dafe5ac3383162105187f952bf31fc6ec531b Mon Sep 17 00:00:00 2001 From: AmirMasoud Nourollah <61701369+Nourollah@users.noreply.github.com> Date: Sun, 3 Apr 2022 23:44:07 +0430 Subject: [PATCH 2/6] Update Dockerfile for serve Compatible with the latest version of MMCV and PyTorch for compatibility with Python3.10 --- docker/serve/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/serve/Dockerfile b/docker/serve/Dockerfile index b04821d400..a53e383b00 100644 --- a/docker/serve/Dockerfile +++ b/docker/serve/Dockerfile @@ -1,9 +1,9 @@ -ARG PYTORCH="1.6.0" -ARG CUDA="10.1" -ARG CUDNN="7" +ARG PYTORCH="1.11.0" +ARG CUDA="11.3" +ARG CUDNN="8" FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel -ARG MMCV="1.4.4" +ARG MMCV="1.4.8" ARG MMSEG="0.23.0" ENV PYTHONUNBUFFERED TRUE From 26d42e7b2e1b13a503f808e4feb54aedc8405c2e Mon Sep 17 00:00:00 2001 From: AmirMasoud Nourollah <61701369+Nourollah@users.noreply.github.com> Date: Mon, 4 Apr 2022 00:10:55 +0430 Subject: [PATCH 3/6] Updating to the last version of supported Python --- docs/en/get_started.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/en/get_started.md b/docs/en/get_started.md index c0dcf44b95..dd10ccee49 100644 --- a/docs/en/get_started.md +++ b/docs/en/get_started.md @@ -42,16 +42,16 @@ If mmcv and mmcv-full are both installed, there will be `ModuleNotFoundError`. a. Create a conda virtual environment and activate it. ```shell -conda create -n open-mmlab python=3.7 -y +conda create -n open-mmlab python=3.10 -y conda activate open-mmlab ``` b. Install PyTorch and torchvision following the [official instructions](https://pytorch.org/). -Here we use PyTorch 1.6.0 and CUDA 10.1. +Here we use PyTorch 1.11.0 and CUDA 11.3. You may also switch to other version by specifying the version number. ```shell -conda install pytorch=1.6.0 torchvision cudatoolkit=10.1 -c pytorch +conda install pytorch=1.11.0 torchvision cudatoolkit=11.3 -c pytorch ``` c. Install [MMCV](https://mmcv.readthedocs.io/en/latest/) following the [official instructions](https://mmcv.readthedocs.io/en/latest/#installation). @@ -68,10 +68,10 @@ pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{ Please replace ``{cu_version}`` and ``{torch_version}`` in the url to your desired one. mmcv-full is only compiled on PyTorch 1.x.0 because the compatibility usually holds between 1.x.0 and 1.x.1. If your PyTorch version is 1.x.1, you can install mmcv-full compiled with PyTorch 1.x.0 and it usually works well. -For example, to install the ``mmcv-full`` with ``CUDA 10.1`` and ``PyTorch 1.6.0``, use the following command: +For example, to install the ``mmcv-full`` with ``CUDA 11.3`` and ``PyTorch 1.11.0``, use the following command: ```shell -pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.6/index.html +pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11/index.html ``` See [here](https://github.com/open-mmlab/mmcv#installation) for different versions of MMCV compatible to different PyTorch and CUDA versions. @@ -155,11 +155,11 @@ pip install -e . # or "python setup.py develop" Here is a full script for setting up mmsegmentation with conda and link the dataset path (supposing that your dataset path is $DATA_ROOT). ```shell -conda create -n open-mmlab python=3.7 -y +conda create -n open-mmlab python=3.10 -y conda activate open-mmlab -conda install pytorch=1.6.0 torchvision cudatoolkit=10.1 -c pytorch -pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.6.0/index.html +conda install pytorch=1.11.0 torchvision cudatoolkit=11.3 -c pytorch +pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11.0/index.html git clone https://github.com/open-mmlab/mmsegmentation.git cd mmsegmentation pip install -e . # or "python setup.py develop" @@ -174,10 +174,10 @@ Here is a full script for setting up mmsegmentation with conda and link the data %DATA_ROOT%. Notice: It must be an absolute path). ```shell -conda create -n open-mmlab python=3.7 -y +conda create -n open-mmlab python=3.10 -y conda activate open-mmlab -conda install pytorch=1.6.0 torchvision cudatoolkit=10.1 -c pytorch +conda install pytorch=1.11.0 torchvision cudatoolkit=11.3 -c pytorch set PATH=full\path\to\your\cpp\compiler;%PATH% pip install mmcv From 4fcd1eaa786a0cfbcd26de0c01a43d837e9fc1e5 Mon Sep 17 00:00:00 2001 From: AmirMasoud Nourollah <61701369+Nourollah@users.noreply.github.com> Date: Mon, 4 Apr 2022 02:16:41 +0430 Subject: [PATCH 4/6] Update Dockerfile --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 7115fb8a3f..22d476e52e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -19,7 +19,7 @@ RUN conda clean --all ARG PYTORCH ARG CUDA ARG MMCV -RUN ["/bin/bash", "-c", "pip install mmcv-full==${MMCV} -f https://download.openmmlab.com/mmcv/dist/cu${CUDA//./}/torch${PYTORCH}/index.html"] +RUN ["/bin/bash", "-c", "pip install --no-cache-dir mmcv-full==${MMCV} -f https://download.openmmlab.com/mmcv/dist/cu${CUDA//./}/torch${PYTORCH}/index.html"] # Install MMSegmentation RUN git clone https://github.com/open-mmlab/mmsegmentation.git /mmsegmentation From 2d38fd28e154717f51f45b2e0d61c5299552fba6 Mon Sep 17 00:00:00 2001 From: AmirMasoud Nourollah <61701369+Nourollah@users.noreply.github.com> Date: Mon, 4 Apr 2022 02:52:12 +0430 Subject: [PATCH 5/6] Update get_started.md --- docs/zh_cn/get_started.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/zh_cn/get_started.md b/docs/zh_cn/get_started.md index d6cca1b93a..928d43a8c3 100644 --- a/docs/zh_cn/get_started.md +++ b/docs/zh_cn/get_started.md @@ -40,17 +40,17 @@ a. 创建一个 conda 虚拟环境并激活它 ```shell -conda create -n open-mmlab python=3.7 -y +conda create -n open-mmlab python=3.10 -y conda activate open-mmlab ``` b. 按照[官方教程](https://pytorch.org/) 安装 PyTorch 和 totchvision, -这里我们使用 PyTorch1.6.0 和 CUDA10.1, +这里我们使用 PyTorch1.11.0 和 CUDA11.3, 您也可以切换至其他版本 ```shell -conda install pytorch=1.6.0 torchvision cudatoolkit=10.1 -c pytorch +conda install pytorch=1.11.0 torchvision cudatoolkit=11.3 -c pytorch ``` c. 按照 [官方教程](https://mmcv.readthedocs.io/en/latest/#installation) @@ -68,10 +68,10 @@ pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{ 请替换 url 里面的 ``{cu_version}`` 和 ``{torch_version}`` 为您想要使用的版本. mmcv-full 仅在 PyTorch 1.x.0 上面编译, 因为在 1.x.0 和 1.x.1 之间通常是兼容的. 如果您的 PyTorch 版本是 1.x.1, 您可以安装用 PyTorch 1.x.0 编译的 mmcv-full 而它通常是可以正常使用的. -例如, 用 ``CUDA 10.1`` and ``PyTorch 1.6.0`` 安装使用 ``mmcv-full``, 使用如下命令: +例如, 用 ``CUDA 11.1`` and ``PyTorch 1.11.0`` 安装使用 ``mmcv-full``, 使用如下命令: ```shell -pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.6/index.html +pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11/index.html ``` 请查看 [这里](https://github.com/open-mmlab/mmcv#installation) 来找到适配不同 PyTorch 和 CUDA 版本的 MMCV. @@ -155,11 +155,11 @@ pip install -e . # 或者 "python setup.py develop" 这里便是一个完整安装 MMSegmentation 的脚本,使用 conda 并链接了数据集的路径(以您的数据集路径为 $DATA_ROOT 来安装)。 ```shell -conda create -n open-mmlab python=3.7 -y +conda create -n open-mmlab python=3.10 -y conda activate open-mmlab -conda install pytorch=1.6.0 torchvision cudatoolkit=10.1 -c pytorch -pip install mmcv-full==latest+torch1.5.0+cu101 -f https://download.openmmlab.com/mmcv/dist/index.html +conda install pytorch=1.11.0 torchvision cudatoolkit=11.3 -c pytorch +pip install mmcv-full==latest+torch1.11.0+cu113 -f https://download.openmmlab.com/mmcv/dist/index.html git clone https://github.com/open-mmlab/mmsegmentation.git cd mmsegmentation pip install -e . # 或者 "python setup.py develop" @@ -174,10 +174,10 @@ ln -s $DATA_ROOT data 注意:它必须是一个绝对路径。 ```shell -conda create -n open-mmlab python=3.7 -y +conda create -n open-mmlab python=3.10 -y conda activate open-mmlab -conda install pytorch=1.6.0 torchvision cudatoolkit=10.1 -c pytorch +conda install pytorch=1.11.0 torchvision cudatoolkit=11.3 -c pytorch set PATH=full\path\to\your\cpp\compiler;%PATH% pip install mmcv From 54cf7366ecfed8525877c051cd79101440910f8d Mon Sep 17 00:00:00 2001 From: AmirMasoud Nourollah <61701369+Nourollah@users.noreply.github.com> Date: Mon, 4 Apr 2022 12:42:54 +0430 Subject: [PATCH 6/6] Update docs/zh_cn/get_started.md Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com> --- docs/zh_cn/get_started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh_cn/get_started.md b/docs/zh_cn/get_started.md index 928d43a8c3..4df2304e89 100644 --- a/docs/zh_cn/get_started.md +++ b/docs/zh_cn/get_started.md @@ -159,7 +159,7 @@ conda create -n open-mmlab python=3.10 -y conda activate open-mmlab conda install pytorch=1.11.0 torchvision cudatoolkit=11.3 -c pytorch -pip install mmcv-full==latest+torch1.11.0+cu113 -f https://download.openmmlab.com/mmcv/dist/index.html +pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11.0/index.html git clone https://github.com/open-mmlab/mmsegmentation.git cd mmsegmentation pip install -e . # 或者 "python setup.py develop"