Skip to content

Commit 3312b9f

Browse files
authored
DOC simplify setup on google colab (#8)
1 parent 6b7bf10 commit 3312b9f

1 file changed

Lines changed: 13 additions & 44 deletions

File tree

tutorials/movies_3T/00_load_colab.py

Lines changed: 13 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
skip it if you run the tutorials on your machine.
99
"""
1010
# sphinx_gallery_thumbnail_path = "static/colab.png"
11-
11+
#
1212
###############################################################################
1313
# Change runtime to use a GPU
1414
# ---------------------------
@@ -20,54 +20,23 @@
2020
# (Menu) "Runtime" -> "Change runtime type" -> "Hardware accelerator" -> "GPU".
2121

2222
###############################################################################
23-
# Mount data with Google Drive
24-
# ----------------------------
25-
#
26-
# First, open the following Google Drive link:
27-
# https://drive.google.com/drive/folders/1NuxO5_GHgDvjrL2FX5ohzAsvWpZuepIA
23+
# Download the data and install all required dependencies
24+
# -------------------------------------------------------
2825
#
29-
# Then, click on the directory name ("vim-5"), and add a shortcut to your Drive
30-
# ("Add shortcut to Drive"). Place the shortcut in the main directory of your
31-
# Google Drive. Do not place it in another folder, or you will have to change
32-
# the code to update the location of the dataset.
33-
#
34-
# Finally, mount Google Drive in Google Colab. To do so, run the following cell,
35-
# and follow the instructions from Google to copy/paste the authorization code.
26+
# Uncomment and run the following cell to download the tutorial data and
27+
# install the required dependencies
3628

37-
from google.colab import drive
38-
drive.mount("/content/drive")
29+
# !gdown --id 1b0I0Ytj06m6GCmfxfNrZuyF97fDo3NZb && \
30+
# tar xzf vim-5-for-ccn.tar.gz && \
31+
# pip install -q voxelwise_tutorials && \
32+
# git clone https://github.com/gallantlab/pycortex
3933

4034
###############################################################################
41-
# Uncomment and run the following command to check that Google Drive was
42-
# correctly mounted.
43-
44-
# !ls drive/MyDrive/vim-5
45-
46-
###############################################################################
47-
# Tell the voxelwise_tutorials package where the data is. (If you placed the
48-
# shortcut in a different location than the main directory of your Google
49-
# Drive, change this code to point to the correct location.)
50-
35+
# Now run the following cell to set up the environment variables for the tutorials
36+
# and pycortex.
37+
5138
import os
52-
os.environ['VOXELWISE_TUTORIALS_DATA'] = "drive/MyDrive/"
53-
54-
###############################################################################
55-
# Install package helper
56-
# ----------------------
57-
#
58-
# Finally, install the tutorial helper package, by uncommenting and running
59-
# the install command.
60-
61-
# !pip install voxelwise_tutorials
62-
63-
###############################################################################
64-
# When using Colab, the install of pycortex might fail to locate the default
65-
# pycortex filestore. Uncomment and run the following line to fix it:
66-
67-
# !git clone https://github.com/gallantlab/pycortex
68-
69-
###############################################################################
70-
# Now change the pycortex filestore path.
39+
os.environ['VOXELWISE_TUTORIALS_DATA'] = "/content"
7140

7241
import cortex
7342
filestore = "/content/pycortex/filestore/"

0 commit comments

Comments
 (0)