Basically, it follows the Official HP setting procedure here.
Colaboratory allows you to run code on your local hardware and access your local file system by using Jupyter to connect to your local runtime.
I think that it will be used only when the local PC has a super powerful GPU and you want to run a program with a processing time of more than 12 hours.
It is assumed that Python3.7 is already installed in the Windows 10 environment with the installer brought from https://www.python.org/ (managing the Python virtual environment with virtualenv and virtualenv wrapper). Note: Anaconda is not in use. </ font>
Open a command prompt and install Jupyter.
Jupyter installation
pip install jupyter
Create a Jupyter configuration file.
Creating a Jupyter configuration file
jupyter notebook --generate-config
The created file is saved in C: \ Users \ xxxx \ .jupyter \
as jupyter_notebook_config.py
. It is loaded when Jupyter notebook is started.
Install the Jupyter extension jupyter_http_over_ws.
jupyter_http_over_ws installation
pip install jupyter_http_over_ws
** Enable ** jupyter_http_over_ws.
jupyter_http_over_ws activation / execution result
C:\Users\xxxx>jupyter serverextension enable --py jupyter_http_over_ws
Enabling: jupyter_http_over_ws
- Writing config: C:\Users\xxxx\.jupyter
- Validating...
jupyter_http_over_ws 0.0.7 ok
Edit the Jupyter ** config file **. Since it is commented out with #
, cancel it and set as follows.
jupyter_notebook_config.py
# Takes precedence over allow_origin_pat.
c.NotebookApp.allow_origin = 'https://colab.research.google.com'
## The port the notebook server will listen on.
c.NotebookApp.port = 8888
## The number of additional ports to try if the specified port is not available.
c.NotebookApp.port_retries = 0
Start Jupyter Notebook.
Launch Jupyter Notebook
C:\Users\xxxx>jupyter notebook
jupyter_http_over_ws extension initialized. Listening on /http_over_websocket
[I 09:33:03.054 NotebookApp] Serving notebooks from local directory: C:/Users/xxxx/Documents/Python
[I 09:33:03.055 NotebookApp] The Jupyter Notebook is running at:
[I 09:33:03.055 NotebookApp] http://localhost:8888/?token=afd9b93664......................................
[I 09:33:03.055 NotebookApp] or http://127.0.0.1:8888/?token=afd9b93664......................................
[I 09:33:03.055 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 09:33:03.396 NotebookApp]
To access the notebook, open this file in a browser:
file:///C:/User/xxxx/AppData/Roaming/jupyter/runtime/nbserver-3744-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=afd9b93664......................................
or http://127.0.0.1:8888/?token=afd9b93664......................................
Copy "http: // localhost: 8888 /? Token = afd9b93664 ...
" output at this time.
Access & log in to Google Colab. in your web browser (Chrome) and open the appropriate notebook.
Click Connect ▼
at the top right of the screen and select Connect to Local Runtime ...
.
A dialog will be displayed, so check the notes carefully and paste the copied "http: // localhost: 8888 /? Token = afd9b93664 ...
" in the Backend URL
field. Add it and click Connect
to complete.
It is successful if the status is Connected (local)
as shown below.
Now you can use it without being bound by the 90-minute rule or the 12-hour rule.