Package: cloudman
cloudmanCommand line tool for managing single-purpose cloud VMs. Currently works with GCP.Features:Single command to provision cloud-based disk images with Ubuntu, NVIDIA drivers, Anaconda, PyTorch, FastAI and more..Single command to attach a disk image, launch a cloud VM instance with any configuration of CPUs, RAM and GPU, and start Jupyter notebook.InstallationInstall thecloudmanpackage usingpip.pip install cloudmancloudmanrequires thegcloudcommand line tool to be installed. Make sure to complete these steps before moving forward.InstallgcloudCLI using this link:https://cloud.google.com/sdk/docs/downloads-interactiveMake sure thegcloudcommand is added to your PATH.Connect thegcloudtool your GCP account by running:gcloud init(Optional) Create a GCP project by running:gcloud projects create PROJECT_IDReplace PROJECT_ID with a unique name e.g. kitten-puppies-999
You can also use an existing project.Activate a project by running:gcloud config set project PROJECT_IDOpen the cloud console by running:cloudman consoleEnable billing to start creating cloud VMs.Usagecloudmanallows you to crate standalone boot disks which can be flexibly attached to any type of machine & GPU configuration.Create a boot diskRunning thecloudman createwill create a boot disk of the given size, then install Ubuntu, NVIDIA CUDA libraries, Anaconda, Pytorch and FastAI deep learning libraries. By default, a 50 GB disk is created.Here are some examples:# Using default disk size of 50GB
cloudman create freesound-2019# Custom disk size
cloudman create freesound-2019 --disk=100GBNote thatcloudmancreates a temporary VM instance to install all the required packages, and then deletes the VM, but retains the disk. It usesthis shell scriptfor setup.Start an instanceYou can launch an instance with the boot disk attached using thecloudman startcommand. You can choose any combination of GPUs and machine types. You can also launch a CPU-only instance, which is the default. Also, you can choose whether you want a preemptible instance (enabled by default, to save cost), or a dedicated instance.Here are some examples:# CPU-only, preemptible
cloudman start jigsaw-ulmfit

# Same as the above command, but explicit
cloudman start jigsaw-ulmfit --gpu=nogpu --machine=auto --spot

# K80 GPU, dedicated
cloudman start jigsaw-ulmfit --gpu=k80 --nospotValid GPU types are:'nogpu', 't4', 'v100', 'p100', 'p4', 'k80'Valid machine types can be found here:https://cloud.google.com/compute/docs/machine-typesIf machine type is set to 'auto', the tool automatically picks a reasonable machine type to match the GPU's RAM & cores. You can see the mappinghere.Once started, you can use the link to access the Jupyter server. Sometimes it may take a minute or two for the Jupyter server to start.SSH into running instanceTo SSH into a running instance use:cloudman ssh jigsaw-ulmfitStop an instanceUse thecloudman stopcommand to stop a running instance. Example:cloudman stop jigsaw-ulmfitList disks and running instancesTo see the available boot disks and running instances, runcloudman listDelete a boot diskTo delete a boot disk, runcloudman delete jigsaw-ulmfitThis will stop any running instances and delte the boot disk complete. All your data will be lost, so be careful while using this.