Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Fix colab mmcv installation #1779

Merged
merged 3 commits into from
Jul 15, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions demo/MMSegmentation_Tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@
"outputs": [],
"source": [
"# Install PyTorch\n",
"!conda install pytorch=1.10.0 torchvision cudatoolkit=11.1 -c pytorch\n",
"!pip install torch torchvision\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix pytorch version 1.12

"# Install MMCV\n",
"!pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.10/index.html"
"!pip install openmim\n",
"!mim install mmcv-full"
]
},
{
Expand Down Expand Up @@ -439,6 +440,7 @@
"outputs": [],
"source": [
"from mmseg.apis import set_random_seed\n",
"from mmseg.utils import get_device\n",
"\n",
"# Since we use only one GPU, BN is used instead of SyncBN\n",
"cfg.norm_cfg = dict(type='BN', requires_grad=True)\n",
Expand Down Expand Up @@ -526,6 +528,7 @@
"cfg.seed = 0\n",
"set_random_seed(0, deterministic=False)\n",
"cfg.gpu_ids = range(1)\n",
"cfg.device = get_device()\n",
"\n",
"# Let's have a look at the final config used for training\n",
"print(f'Config:\\n{cfg.pretty_text}')"
Expand Down Expand Up @@ -618,7 +621,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3.10.4 ('colab')",
"language": "python",
"name": "python3"
},
Expand All @@ -632,7 +635,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.0"
"version": "3.10.4"
},
"pycharm": {
"stem_cell": {
Expand All @@ -642,6 +645,11 @@
},
"source": []
}
},
"vscode": {
"interpreter": {
"hash": "407d2a53ddc3f8f7c4edd35e4d9b95b1c1ccdf5b3711df67dd21487022baf36e"
}
}
},
"nbformat": 4,
Expand Down