Unverified Commit 290dadb9 authored by Rhett Ying's avatar Rhett Ying Committed by GitHub
Browse files

[doc] install cpu version by default in notebooks (#7186)

parent 4bd2eadf
......@@ -43,10 +43,11 @@
"os.environ['TORCH'] = torch.__version__\n",
"os.environ['DGLBACKEND'] = \"pytorch\"\n",
"\n",
"# Install the CUDA version. If you want to install CPU version, please\n",
"# refer to https://www.dgl.ai/pages/start.html.\n",
"device = torch.device(\"cuda\")\n",
"!pip install --pre dgl -f https://data.dgl.ai/wheels-test/cu121/repo.html\n",
"# Install the CPU version in default. If you want to install CUDA version,\n",
"# please refer to https://www.dgl.ai/pages/start.html and change runtime type\n",
"# accordingly.\n",
"device = torch.device(\"cpu\")\n",
"!pip install --pre dgl -f https://data.dgl.ai/wheels-test/repo.html\n",
"\n",
"try:\n",
" import dgl\n",
......@@ -348,8 +349,7 @@
"metadata": {
"colab": {
"private_outputs": true,
"provenance": [],
"gpuType": "T4"
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
......@@ -366,8 +366,7 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
},
"accelerator": "GPU"
}
},
"nbformat": 4,
"nbformat_minor": 0
......
......@@ -44,10 +44,11 @@
"os.environ['TORCH'] = torch.__version__\n",
"os.environ['DGLBACKEND'] = \"pytorch\"\n",
"\n",
"# Install the CUDA version. If you want to install CPU version, please\n",
"# refer to https://www.dgl.ai/pages/start.html.\n",
"device = torch.device(\"cuda\")\n",
"!pip install --pre dgl -f https://data.dgl.ai/wheels-test/cu121/repo.html\n",
"# Install the CPU version in default. If you want to install CUDA version,\n",
"# please refer to https://www.dgl.ai/pages/start.html and change runtime type\n",
"# accordingly.\n",
"device = torch.device(\"cpu\")\n",
"!pip install --pre dgl -f https://data.dgl.ai/wheels-test/repo.html\n",
"\n",
"try:\n",
" import dgl\n",
......@@ -351,9 +352,7 @@
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"gpuType": "T4",
"private_outputs": true,
"provenance": []
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment