mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
Add PyTorch installation before import torch.
This commit is contained in:
parent
bc013fbb05
commit
3bf399eb2f
@ -33,7 +33,7 @@
|
|||||||
"## Install MMSegmentation\n",
|
"## Install MMSegmentation\n",
|
||||||
"This step may take several minutes. \n",
|
"This step may take several minutes. \n",
|
||||||
"\n",
|
"\n",
|
||||||
"We use PyTorch 1.12 and CUDA 11.3 installed in Colab for this tutorial. You may install other versions by change the version number in pip install command. "
|
"We use PyTorch 1.12 and CUDA 11.3 for this tutorial. You may install other versions by change the version number in pip install command. "
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -49,13 +49,9 @@
|
|||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"# Check nvcc version\n",
|
"# Check nvcc version\n",
|
||||||
"import torch\n",
|
|
||||||
"import torchvision\n",
|
|
||||||
"!nvcc -V\n",
|
"!nvcc -V\n",
|
||||||
"# Check GCC version\n",
|
"# Check GCC version\n",
|
||||||
"!gcc - -version\n",
|
"!gcc --version"
|
||||||
"# Check Pytorch installation\n",
|
|
||||||
"print(torch.__version__, torch.cuda.is_available())"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -70,12 +66,14 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
|
"# Install PyTorch\n",
|
||||||
|
"conda install pytorch == 1.12.0 torchvision == 0.13.0 torchaudio == 0.12.0 cudatoolkit = 11.3 - c pytorch\n",
|
||||||
"# Install mim\n",
|
"# Install mim\n",
|
||||||
"!pip install -U openmim\n",
|
"!pip install -U openmim\n",
|
||||||
"# Install mmengine\n",
|
"# Install mmengine\n",
|
||||||
"!mim install mmengine\n",
|
"!mim install mmengine\n",
|
||||||
"# Install MMCV\n",
|
"# Install MMCV\n",
|
||||||
"!mim install 'mmcv >= 2.0.0rc1'"
|
"!mim install 'mmcv >= 2.0.0rc1'\n"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -108,6 +106,10 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
|
"# Check Pytorch installation\n",
|
||||||
|
"import torch, torchvision\n",
|
||||||
|
"print(torch.__version__, torch.cuda.is_available())\n",
|
||||||
|
"\n",
|
||||||
"# Check MMSegmentation installation\n",
|
"# Check MMSegmentation installation\n",
|
||||||
"import mmseg\n",
|
"import mmseg\n",
|
||||||
"print(mmseg.__version__)"
|
"print(mmseg.__version__)"
|
||||||
@ -521,7 +523,7 @@
|
|||||||
"provenance": []
|
"provenance": []
|
||||||
},
|
},
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
"display_name": "Python 3.7.13 ('pt1.12')",
|
"display_name": "Python 3.8.5 ('tensorflow')",
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"name": "python3"
|
"name": "python3"
|
||||||
},
|
},
|
||||||
@ -535,7 +537,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.7.13"
|
"version": "3.8.5"
|
||||||
},
|
},
|
||||||
"pycharm": {
|
"pycharm": {
|
||||||
"stem_cell": {
|
"stem_cell": {
|
||||||
@ -548,7 +550,7 @@
|
|||||||
},
|
},
|
||||||
"vscode": {
|
"vscode": {
|
||||||
"interpreter": {
|
"interpreter": {
|
||||||
"hash": "ffdb7915c29738c259ec7ee5d0d1b9253c264f1fd267d45dd77f1a420396c120"
|
"hash": "20d4b83e0c8b3730b580c42434163d64f4b735d580303a8fade7c849d4d29eba"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user