Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Buat instance Deep Learning VM menggunakan gcloud CLI
Halaman ini menunjukkan cara membuat instance Deep Learning VM Images menggunakan Google Cloud CLI.
Sebelum memulai
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Untuk menggunakan gcloud di Cloud Shell untuk panduan memulai ini, aktifkan
Cloud Shell terlebih dahulu menggunakan petunjuk yang diberikan di Memulai Cloud
Shell.
Buat instance baru
Petunjuk ini membuat instance Deep Learning VM dengan parameter berikut:
Menggunakan image TensorFlow di CUDA 9.2:
tf-latest-cu92.
Setelah beberapa waktu, instance VM akan dibuat dan ringkasan konfigurasinya akan ditampilkan.
Anda baru saja membuat instance Deep Learning VM pertama Anda. Untuk
memverifikasi instance dan melihat statusnya, gunakan perintah gcloudlist seperti yang ditunjukkan di sini
untuk mencantumkan semua instance:
gcloud compute instances list
Tindakan ini akan menampilkan semua instance Compute Engine dari semua zona di project saat ini.
Anda juga dapat melihat dan mengelola instance Deep Learning VM di
Google Cloud konsol di instance VM Compute Engine.
Untuk melihat status instance ini saja:
gcloud compute instances describe $INSTANCE_NAME
Mengakses instance baru Anda
Setelah dibuat, instance Deep Learning VM akan otomatis dimulai. Anda dapat mengaksesnya menggunakan SSH dengan perintah berikut:
gcloud compute ssh $INSTANCE_NAME
Compute Engine akan menyebarkan kunci SSH Anda dan membuat pengguna Anda. Untuk mengetahui informasi selengkapnya, lihat Menghubungkan ke Instance.
Hentikan instance
Jalankan perintah berikut dari komputer lokal Anda (bukan di instance):
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-17 UTC."],[[["\u003cp\u003eThis guide outlines the process of creating a Deep Learning VM instance using the Google Cloud CLI, including steps for setup and initialization.\u003c/p\u003e\n"],["\u003cp\u003eThe creation process utilizes specific parameters like a TensorFlow image on CUDA 9.2, \u003ccode\u003eus-west1-b\u003c/code\u003e zone, \u003ccode\u003emy-new-instance\u003c/code\u003e name, \u003ccode\u003en1-standard-8\u003c/code\u003e instance type, and an NVIDIA Tesla V100 GPU.\u003c/p\u003e\n"],["\u003cp\u003eAfter creating the instance, you can access it via SSH using the \u003ccode\u003egcloud compute ssh $INSTANCE_NAME\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eThe guide provides commands to stop, start, and delete the created Deep Learning VM instance to manage its lifecycle.\u003c/p\u003e\n"],["\u003cp\u003eTo ensure you don't accrue charges, it's advised to delete the instance via \u003ccode\u003egcloud compute instances delete $INSTANCE_NAME\u003c/code\u003e once you are done.\u003c/p\u003e\n"]]],[],null,["# Quickstart: Create a Deep Learning VM instance by using the gcloud CLI\n\nCreate a Deep Learning VM instance by using the gcloud CLI\n==========================================================\n\nThis page shows you how to create a Deep Learning VM Images instance\nby using the Google Cloud CLI.\n\nBefore you begin\n----------------\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\nTo use the Google Cloud CLI for this quickstart, you must first\ninstall and initialize the [Google Cloud CLI](/sdk/docs):\n\n1. Download and install the Google Cloud CLI using the instructions given on [Installing Google Cloud CLI](/sdk/downloads).\n2. Initialize the SDK using the instructions given on [Initializing Cloud\n SDK](/sdk/docs/initializing).\n\nTo use `gcloud` in Cloud Shell for this quickstart, first activate\nCloud Shell using the instructions given on [Starting Cloud\nShell](/shell/docs/starting-cloud-shell).\n\nCreate a new instance\n---------------------\n\nThese instructions create a Deep Learning VM instance with the\nfollowing parameters:\n\n- Using a TensorFlow on CUDA 9.2 [image](/deep-learning-vm/docs/images): `tf-latest-cu92`.\n- In the US West1-B [zone](/compute/docs/gpus): `us-west1-b`.\n- Named `my-new-instance`.\n- Of the [instance type](/compute/docs/machine-types) `n1-standard-8`.\n- Using an NVIDIA Tesla V100 [GPU](/compute/docs/gpus): `type=nvidia-tesla-v100,count=8`.\n- With a boot disk of 120 GB.\n- With an NVIDIA GPU driver set to install on first run: `install-nvidia-driver=True`.\n\n| **Note:** For more information about additional VM options available to you, see [Choosing an Image](/deep-learning-vm/docs/images).\n\nAt the command line, enter the following: \n\n export IMAGE_FAMILY=\"tf-latest-cu92\"\n export ZONE=\"us-west1-b\"\n export INSTANCE_NAME=\"my-new-instance\"\n export INSTANCE_TYPE=\"n1-standard-8\"\n gcloud compute instances create $INSTANCE_NAME \\\n --zone=$ZONE \\\n --image-family=$IMAGE_FAMILY \\\n --image-project=deeplearning-platform-release \\\n --maintenance-policy=TERMINATE \\\n --accelerator=\"type=nvidia-tesla-v100,count=8\" \\\n --machine-type=$INSTANCE_TYPE \\\n --boot-disk-size=120GB \\\n --metadata=\"install-nvidia-driver=True\"\n\nAfter some time, the VM instance is created and a summary of its configuration\nis shown.\n\nYou've just created your first Deep Learning VM instance. To\nverify the instance and see its status, use the `gcloud`\n[`list`](/sdk/gcloud/reference/compute/instances/list) command as shown here\nto list all instances: \n\n gcloud compute instances list\n\nThis displays all Compute Engine instances from all zones in the current project.\n\nYou can also view and maintain your Deep Learning VM instance on the\nGoogle Cloud console in [Compute Engine VM\ninstances](https://console.cloud.google.com/compute/instances).\n\nTo view the status of just this instance: \n\n gcloud compute instances describe $INSTANCE_NAME\n\nAccess your new instance\n------------------------\n\nAfter you've created your Deep Learning VM instance, it starts\nautomatically. You can access it using SSH using the following command: \n\n gcloud compute ssh $INSTANCE_NAME\n\nCompute Engine will propagate your SSH keys and create your user. For more\ninformation, see [Connecting to\nInstances](/compute/docs/instances/connecting-to-instance).\n\nStop the instance\n-----------------\n\nRun the following command from your local machine (not on the instance): \n\n gcloud compute instances stop $INSTANCE_NAME\n\nThe [`stop`](/sdk/gcloud/reference/compute/instances/stop) command performs a\nclean shutdown.\n\nStart the instance\n------------------\n\nAfter the instance is initially created, Compute Engine starts it. To start the\ninstance manually when it's stopped, run the following command: \n\n gcloud compute instances start $INSTANCE_NAME\n\nThe [`start`](/sdk/gcloud/reference/compute/instances/start) command starts a\nstopped virtual machine instance.\n\nClean up\n--------\n\n\nTo avoid incurring charges to your Google Cloud account for\nthe resources used on this page, follow these steps.\n\nTo delete the Deep Learning VM instance that you created, at the\ncommand line, enter the following command: \n\n gcloud compute instances delete $INSTANCE_NAME\n\nThe [`delete`](/sdk/gcloud/reference/compute/instances/delete) command deletes\nCompute Engine instances.\n\nWhat's next\n-----------\n\n- Read a more in-depth description of this process in [Creating a\n Deep Learning VM instance From the\n CLI](/deep-learning-vm/docs/cli).\n- Learn more about [Images, image families, and\n instances](/deep-learning-vm/docs/concepts-images)."]]