Skip to content

Commit 1924470

Browse files
NourollahMeowZheng
andauthored
Updating Dockerfiles From Docker Directory and get_started.md to Reach Last Stable Version of Python, PyTorch and MMCV (open-mmlab#1446)
* Update Dockerfile Compatible with the latest version of MMCV and PyTorch for compatibility with Python3.10 * Update Dockerfile for serve Compatible with the latest version of MMCV and PyTorch for compatibility with Python3.10 * Updating to the last version of supported Python * Update Dockerfile * Update get_started.md * Update docs/zh_cn/get_started.md Co-authored-by: Miao Zheng <[email protected]> Co-authored-by: Miao Zheng <[email protected]>
1 parent 58ad8aa commit 1924470

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

docker/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
ARG PYTORCH="1.6.0"
2-
ARG CUDA="10.1"
3-
ARG CUDNN="7"
4-
ARG MMCV="1.3.13"
1+
ARG PYTORCH="1.11.0"
2+
ARG CUDA="11.3"
3+
ARG CUDNN="8"
4+
ARG MMCV="1.4.8"
55

66
FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
77

@@ -19,7 +19,7 @@ RUN conda clean --all
1919
ARG PYTORCH
2020
ARG CUDA
2121
ARG MMCV
22-
RUN ["/bin/bash", "-c", "pip install mmcv-full==${MMCV} -f https://download.openmmlab.com/mmcv/dist/cu${CUDA//./}/torch${PYTORCH}/index.html"]
22+
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"]
2323

2424
# Install MMSegmentation
2525
RUN git clone https://github.com/open-mmlab/mmsegmentation.git /mmsegmentation

docker/serve/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
ARG PYTORCH="1.6.0"
2-
ARG CUDA="10.1"
3-
ARG CUDNN="7"
1+
ARG PYTORCH="1.11.0"
2+
ARG CUDA="11.3"
3+
ARG CUDNN="8"
44
FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
55

6-
ARG MMCV="1.4.4"
6+
ARG MMCV="1.4.8"
77
ARG MMSEG="0.23.0"
88

99
ENV PYTHONUNBUFFERED TRUE

docs/en/get_started.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@ If mmcv and mmcv-full are both installed, there will be `ModuleNotFoundError`.
4242
a. Create a conda virtual environment and activate it.
4343

4444
```shell
45-
conda create -n open-mmlab python=3.7 -y
45+
conda create -n open-mmlab python=3.10 -y
4646
conda activate open-mmlab
4747
```
4848

4949
b. Install PyTorch and torchvision following the [official instructions](https://pytorch.org/).
50-
Here we use PyTorch 1.6.0 and CUDA 10.1.
50+
Here we use PyTorch 1.11.0 and CUDA 11.3.
5151
You may also switch to other version by specifying the version number.
5252

5353
```shell
54-
conda install pytorch=1.6.0 torchvision cudatoolkit=10.1 -c pytorch
54+
conda install pytorch=1.11.0 torchvision cudatoolkit=11.3 -c pytorch
5555
```
5656

5757
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}/{
6868
Please replace ``{cu_version}`` and ``{torch_version}`` in the url to your desired one. mmcv-full is only compiled on
6969
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,
7070
you can install mmcv-full compiled with PyTorch 1.x.0 and it usually works well.
71-
For example, to install the ``mmcv-full`` with ``CUDA 10.1`` and ``PyTorch 1.6.0``, use the following command:
71+
For example, to install the ``mmcv-full`` with ``CUDA 11.3`` and ``PyTorch 1.11.0``, use the following command:
7272

7373
```shell
74-
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.6/index.html
74+
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11/index.html
7575
```
7676

7777
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"
155155
Here is a full script for setting up mmsegmentation with conda and link the dataset path (supposing that your dataset path is $DATA_ROOT).
156156

157157
```shell
158-
conda create -n open-mmlab python=3.7 -y
158+
conda create -n open-mmlab python=3.10 -y
159159
conda activate open-mmlab
160160

161-
conda install pytorch=1.6.0 torchvision cudatoolkit=10.1 -c pytorch
162-
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.6.0/index.html
161+
conda install pytorch=1.11.0 torchvision cudatoolkit=11.3 -c pytorch
162+
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11.0/index.html
163163
git clone https://github.com/open-mmlab/mmsegmentation.git
164164
cd mmsegmentation
165165
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
174174
%DATA_ROOT%. Notice: It must be an absolute path).
175175

176176
```shell
177-
conda create -n open-mmlab python=3.7 -y
177+
conda create -n open-mmlab python=3.10 -y
178178
conda activate open-mmlab
179179

180-
conda install pytorch=1.6.0 torchvision cudatoolkit=10.1 -c pytorch
180+
conda install pytorch=1.11.0 torchvision cudatoolkit=11.3 -c pytorch
181181
set PATH=full\path\to\your\cpp\compiler;%PATH%
182182
pip install mmcv
183183

docs/zh_cn/get_started.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@
4040
a. 创建一个 conda 虚拟环境并激活它
4141

4242
```shell
43-
conda create -n open-mmlab python=3.7 -y
43+
conda create -n open-mmlab python=3.10 -y
4444
conda activate open-mmlab
4545

4646
```
4747

4848
b. 按照[官方教程](https://pytorch.org/) 安装 PyTorch 和 totchvision,
49-
这里我们使用 PyTorch1.6.0 和 CUDA10.1
49+
这里我们使用 PyTorch1.11.0 和 CUDA11.3
5050
您也可以切换至其他版本
5151

5252
```shell
53-
conda install pytorch=1.6.0 torchvision cudatoolkit=10.1 -c pytorch
53+
conda install pytorch=1.11.0 torchvision cudatoolkit=11.3 -c pytorch
5454
```
5555

5656
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}/{
6868
请替换 url 里面的 ``{cu_version}````{torch_version}`` 为您想要使用的版本. mmcv-full 仅在
6969
PyTorch 1.x.0 上面编译, 因为在 1.x.0 和 1.x.1 之间通常是兼容的. 如果您的 PyTorch 版本是 1.x.1,
7070
您可以安装用 PyTorch 1.x.0 编译的 mmcv-full 而它通常是可以正常使用的.
71-
例如, 用 ``CUDA 10.1`` and ``PyTorch 1.6.0`` 安装使用 ``mmcv-full``, 使用如下命令:
71+
例如, 用 ``CUDA 11.1`` and ``PyTorch 1.11.0`` 安装使用 ``mmcv-full``, 使用如下命令:
7272

7373
```shell
74-
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.6/index.html
74+
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11/index.html
7575
```
7676

7777
请查看 [这里](https://github.com/open-mmlab/mmcv#installation) 来找到适配不同 PyTorch 和 CUDA 版本的 MMCV.
@@ -155,11 +155,11 @@ pip install -e . # 或者 "python setup.py develop"
155155
这里便是一个完整安装 MMSegmentation 的脚本,使用 conda 并链接了数据集的路径(以您的数据集路径为 $DATA_ROOT 来安装)。
156156

157157
```shell
158-
conda create -n open-mmlab python=3.7 -y
158+
conda create -n open-mmlab python=3.10 -y
159159
conda activate open-mmlab
160160

161-
conda install pytorch=1.6.0 torchvision cudatoolkit=10.1 -c pytorch
162-
pip install mmcv-full==latest+torch1.5.0+cu101 -f https://download.openmmlab.com/mmcv/dist/index.html
161+
conda install pytorch=1.11.0 torchvision cudatoolkit=11.3 -c pytorch
162+
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11.0/index.html
163163
git clone https://github.com/open-mmlab/mmsegmentation.git
164164
cd mmsegmentation
165165
pip install -e . # 或者 "python setup.py develop"
@@ -174,10 +174,10 @@ ln -s $DATA_ROOT data
174174
注意:它必须是一个绝对路径。
175175

176176
```shell
177-
conda create -n open-mmlab python=3.7 -y
177+
conda create -n open-mmlab python=3.10 -y
178178
conda activate open-mmlab
179179

180-
conda install pytorch=1.6.0 torchvision cudatoolkit=10.1 -c pytorch
180+
conda install pytorch=1.11.0 torchvision cudatoolkit=11.3 -c pytorch
181181
set PATH=full\path\to\your\cpp\compiler;%PATH%
182182
pip install mmcv
183183

0 commit comments

Comments
 (0)