Coiled notebooks#
We recently pushed out a new, experimental notebooks feature for easily launching Jupyter servers in the cloud from your local machine. We’re excited about Coiled notebooks because they:
Allow users to easily scale up their computations on a single machine in the cloud.
Make GPUs more accessible.
How to launch a notebook#
You can launch a Coiled notebook with:
pip install "coiled>=0.6.8"
coiled notebook start
This will provision an instance on your cloud provider, set up a JupyterLab session, and connect you to that session in a web browser.
In addition to the advantages you get from Coiled Dask clusters like:
Automatic software environment syncing (docs)
The same cloud permissions you have locally
Run in any region on AWS/GCP
Coiled notebooks also support automatic file syncing between your local machine and the remote Jupyter server in the cloud. This lets you bring your local files with you, edit them in the cloud, and have those changes brought back locally.
To run a notebook with automatic file syncing, install Mutagen
brew install mutagen-io/mutagen/mutagen
and use the --sync
flag:
coiled notebook start --sync # Automatically syncs your files
Example: Scaling up#
Sometimes users just want to spin up a big machine in the cloud and use a local Dask cluster on that machine for their computations. This is a great fit when working with ~10-100 GB datasets where a single, large machine can be effective.
With Coiled notebooks, you can use the --vm-type
option to specify what instance type you want
to use:
coiled notebook start --vm-type m6i.32xlarge # 128 Cores and 512 GB of RAM
Then on the Jupyter server, Dask’s LocalCluster
will utilize the full resources of the instance
(e.g. 128 core and ~500 GB of memory in this case)
Example: Easy access to GPUs#
Several libraries in the PyData space like PyTorch, XGBoost, and the entire RAPIDS ecosystem (e.g. cuDF, cuML, etc) support GPU acceleration. This can lead to large performance improvements in a variety of applications. However, today many data scientists and developers don’t readily have access to GPUs.
Coiled notebooks make it easy to run on GPU-enabled instances, lowering the barrier to entry for GPU
accelerated computations. For example, you can use the --gpu
flag and --container
option to launch a
Coiled notebook on a GPU instance inside a pre-built RAPIDS docker image:
# GPU enabled notebook running inside a RAPIDS docker image
coiled notebook start --gpu --container nvcr.io/nvidia/rapidsai/rapidsai:23.04-cuda11.8-runtime-ubuntu20.04-py3.10
Tip
The --gpu
flag defaults to a g4dn.xlarge
(NVIDIA T4) instance,
but you can use the --vm-type
option to specific any GPU instance you
want to run on.
Try out and report#
We’re excited about Coiled notebooks and think they can be useful to users. They’re also a work in progress. We value feedback from users to inform future development. Feel free to try Coiled notebooks and let us know about your experience in the Coiled feedback issue tracker or by emailing support@coiled.io.