Fordítsd magyarra: Colaboratory Local runtimes Colab lets you connect to a local…
- User
Fordítsd magyarra: Colaboratory Local runtimes Colab lets you connect to a local runtime. This allows you to execute code on your local hardware.
Security considerations Make sure you trust the authors of any notebook before executing it. With a local connection, the code you execute can read, write, and delete files on your computer.
Connecting to a runtime on your local machine can provide many benefits. With these benefits come serious potential risks. By connecting to a local runtime, you are allowing the Colab frontend to execute code in the notebook using the local resources on your machine. This means that the notebook could:
Invoke arbitrary commands (e.g. "rm -rf /") Access the local file system Run malicious content on your machine Before attempting to connect to a local runtime, make sure you trust the authors of the notebook and ensure you understand what code is being executed. For more information on the Jupyter notebook server's security model, consult Jupyter's documentation.
Setup instructions Step 1: Start a runtime You can either run Jupyter directly or use Colab's Docker image. The Docker image includes packages found in our hosted runtime environments (https://colab.research.google.com) and enables some UI features such as debugging and the resource utilization monitor. Packages (files in general) installed on your local machine are however not available by default. The Docker image is provided for linux/amd64 platforms.
Option 1. Colab Docker runtime image Install Docker on your local machine. Note that europe-docker.pkg.dev and asia-docker.pkg.dev are alternative mirrors to us-docker.pkg.dev below. Downloads will be faster for users in those continents. The images are identical. Start a runtime:
docker run -p 127.0.0.1:9000:8080 us-docker.pkg.dev/colab-images/public/runtimeFor GPU support, with NVIDIA drivers and the NVIDIA container toolkit installed, use:
docker run --gpus=all -p 127.0.0.1:9000:8080 us-docker.pkg.dev/colab-images/public/runtimeThe image has been tested with NVIDIA T4, L4, and A100 GPUs.
Once the container has started, it will print a message with the initial backend URL used for authentication, of the form 'http://127.0.0.1:9000/?token=...'. Make a copy of this URL as you'll need to provide this for step 2 below.
Option 2. Jupyter runtime Install Jupyter on your local machine. New notebook servers are started normally, though you will need to set a flag to explicitly trust WebSocket connections from the Colab frontend.
jupyter notebook
--NotebookApp.allow_origin='https://colab.research.google.com' --port=8888 --NotebookApp.port_retries=0 - Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.