{"id":19748710,"url":"https://github.com/doitintl/gpu-finder","last_synced_at":"2025-04-30T08:33:50.550Z","repository":{"id":86290500,"uuid":"352757559","full_name":"doitintl/gpu-finder","owner":"doitintl","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-16T21:02:43.000Z","size":9870,"stargazers_count":48,"open_issues_count":0,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-04-17T00:42:44.362Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doitintl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-03-29T19:13:38.000Z","updated_at":"2024-04-16T06:33:01.000Z","dependencies_parsed_at":"2024-04-16T22:12:48.660Z","dependency_job_id":null,"html_url":"https://github.com/doitintl/gpu-finder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Fgpu-finder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Fgpu-finder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Fgpu-finder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Fgpu-finder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doitintl","download_url":"https://codeload.github.com/doitintl/gpu-finder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224203965,"owners_count":17273024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T02:23:08.549Z","updated_at":"2024-11-12T02:23:09.044Z","avatar_url":"https://github.com/doitintl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GPU Finder\n\nGPU Finder attempts to make it easier to find and provision Compute Engine Instances with GPUs.\n\n## Why GPU Finder?\n\nGPU quotas are not always consistent across regions and at any particular time. At peak times, there may be limited availability of GPUs in the cloud due to high demand for their compute capacity. This makes finding and provisioning of GPUs difficult and time consuming. By just setting a few configuration parameters, this script can be used to automate the process of finding and provisioning Compute Engine instances with GPUs.\n\n## Prerequisites\n\n* A GCP account and access to a service account with the permissions needed for creating instances. See the [docs](https://cloud.google.com/docs/authentication/production#passing_variable) for creating a key file and setting the ```GOOGLE_APPLICATION_CREDENTIALS``` environment variable\n* A python environment with ```google-api-python-client==2.0.2``` library installed using pip\n\n## Using the GPU Finder\n\n1. Download the service account key file and set the ```GOOGLE_APPLICATION_CREDENTIALS``` environment variable to authenticate with GCP APIs\n2. Install the Google API client library by running the command below:\n```bash\npip install -r requirements.txt\n```` \n3. Modify the `gpu-config.json` file to set the appropriate configuration parameters. In addition to the name of the machine, the important parameters to set are:\n * number_of_instances: Number of instances to create\n * machine_type: [The type of Compute Engine machine(s) to create](https://cloud.google.com/compute/docs/machine-types)\n * zone: [A list of zones to attempt to create instances in](https://cloud.google.com/compute/docs/regions-zones). To attempt all zones, leave the list blank (i.e. empty brackets [] will look for instances in all zones)\n\n| Zone                      | Location\t                                    | GPU model\t                | GPU virtual workstation |\n|---------------------------|----------------------------------------------|---------------------------|-------------------------|\n| asia-east1-a              |\tChanghua County, Taiwan, APAC\t               | T4, P100, K80.            |\tT4, P100                |\n| asia-east1-b              |\tChanghua County, Taiwan, APAC\t               | K80                       |                         |\n| asia-east1-c              |\tChanghua County, Taiwan, APAC\t               | T4, V100, P100            |\tT4, P100                |\n| asia-east2-a              |                                              |                           |                         |\n| asia-east2-b              |                                              |                           |                         |\n| asia-east2-c              |\tHong Kong, APAC\t\t\t                     |                           |                         |\n| asia-northeast1-a         |                                              |                           |                         |\n| asia-northeast1-c         |\tTokyo, Japan, APAC\t                        | T4                        |\tT4                      |\n| asia-northeast1-b         |\tTokyo, Japan, APAC\t\t\t                  |                           |                         |\n| asia-northeast2-a         |                                              |                           |                         |\n| asia-northeast2-b         |                                              |                           |                         |\n| asia-northeast2-c         |\tOsaka, Japan, APAC\t                        |                           |                         |\n| asia-northeast3-a         |\tSeoul, South Korea, APAC\t                  |                           |                         |\n| asia-northeast3-b         |                                              |                           |                         |\n| asia-northeast3-c         |\tSeoul, South Korea, APAC\t                  | T4                        |\tT4                      |\n| asia-south1-a             |                                              |                           |                         |\n| asia-south1-b             |\tMumbai, India, APAC\t                        | T4                        |\tT4                      |\n| asia-south1-c             |\tMumbai, India, APAC\t                        |                           |                         |\n| asia-southeast1-a         |\tJurong West, Singapore, APAC\t               | T4                        |\tT4                      |\n| asia-southeast1-b         |\tJurong West, Singapore, APAC\t               | T4, P4                    |\tT4, P4                  |\n| asia-southeast1-c         |\tJurong West, Singapore, APAC\t               | A100, T4, P4              |\tT4, P4                  |\n| asia-southeast2-a         |                                              |                           |                         |\n| asia-southeast2-b         |\tJakarta, Indonesia, APAC\t                  | T4                        |\tT4                      |\n| asia-southeast2-c         |\tJakarta, Indonesia, APAC\t                  |                           |                         |\n| australia-southeast1-a    |\tSydney, Australia, APAC\t                     | T4, P4                    |\tT4, P4                  |\n| australia-southeast1-b    |\tSydney, Australia, APAC\t                     | P4                        |\tP4                      |\n| australia-southeast1-c    |\tSydney, Australia, APAC\t                     | P100                      |\tP100                    |\n| europe-north1-a           |                                              |                           |                         |\n| europe-north1-b           |                                              |                           |                         |\n| europe-north1-c           |\tHamina, Finland, Europe\t                     |                           |                         |\n| europe-west1-b            |\tSt. Ghislain, Belgium, Europe\t               | P100, K80                 |\tP100                    |\n| europe-west1-c            |\tSt. Ghislain, Belgium, Europe\t               |                           |                         |\n| europe-west1-d            |\tSt. Ghislain, Belgium, Europe\t               | P100, K80                 |\tP100                    |\n| europe-west2-a            |                                              |                           |                         |\n| europe-west2-b            |\tLondon, England, Europe\t                     | T4                        |\tT4                      |\n| europe-west2-c            |\tLondon, England, Europe\t                     |                           |                         |\n| europe-west3-a            |\tFrankfurt, Germany, Europe\t                  |                           |                         |\n| europe-west3-b            |\tFrankfurt, Germany, Europe\t                  | T4                        |\tT4                      |\n| europe-west3-c            |\tFrankfurt, Germany, Europe\t                  |                           |                         |\n| europe-west4-a            |\tEemshaven, Netherlands, Europe\t            | A100, V100, P100          |\tP100                    |\n| europe-west4-b            |\tEemshaven, Netherlands, Europe\t            | A100, T4, P4, V100        |\tT4, P4                  |\n| europe-west4-c            |\tEemshaven, Netherlands, Europe\t            | T4, P4, V100\t             | T4, P4                  |\n| europe-west6-a            |                                              |                           |                         |\n| europe-west6-b            |                                              |                           |                         |\n| europe-west6-c            |\tZurich, Switzerland, Europe\t               |                           |                         |\n| northamerica-northeast1-a |                                              |                           |                         |\n| northamerica-northeast1-b |                                              |                           |                         |\n| northamerica-northeast1-c |\tMontréal, Québec, North America\t            | P4                        |\tP4                      |\n| southamerica-east1-a      |                                              |                           |                         |\n| southamerica-east1-b      |\tOsasco, São Paulo, Brazil, South America     |                           |                         |\n| southamerica-east1-c      |\tOsasco, São Paulo, Brazil, South America     | T4                        |\tT4                      |\n| us-central1-a             |\tCouncil Bluffs, Iowa, North America          | A100, T4, P4, V100, K80   |\tT4, P4                  |\n| us-central1-b             |\tCouncil Bluffs, Iowa, North America          | A100, T4, V100            |\tT4                      |\n| us-central1-c             |\tCouncil Bluffs, Iowa, North America          | A100, P4, V100, P100, K80 |\tP4, P100                |\n| us-central1-f             |\tCouncil Bluffs, Iowa, North America          | T4, V100, P100, K80       |\tT4, P100                |\n| us-east1-b                |\tMoncks Corner, South Carolina, North America\t| P100                      |\tP100                    |\n| us-east1-c                |\tMoncks Corner, South Carolina, North America\t| T4, V100, P100, K80       |\tT4, P100                |\n| us-east1-d                |\tMoncks Corner, South Carolina, North America\t| T4, K80                   |\tT4                      |\n| us-east4-a                |\tAshburn, Virginia, North America             | P4\t                      | P4                      |\n| us-east4-b                |\tAshburn, Virginia, North America             | T4, P4                    |\tT4, P4                  |\n| us-east4-c                |\tAshburn, Virginia, North America             | P4                        |\tP4                      |\n| us-west1-a                |\tThe Dalles, Oregon, North America            | T4, V100, P100            |\tT4                      |\n| us-west1-b                |\tThe Dalles, Oregon, North America            | T4, V100, P100, K80       |\tT4, P100                |\n| us-west1-c                |\tThe Dalles, Oregon, North America            |                           |                         |\n| us-west2-a                |\tLos Angeles, California, North America       |                           |                         |\n| us-west2-b                |                                              |                           |                         |\n| us-west2-c                |\tLos Angeles, California, North America       | P4                        |\tP4                      |\n| us-west3-a                |                                              |                           |                         |\n| us-west3-b                |                                              |                           |                         |\n| us-west3-c                |\tSalt Lake City, Utah, North America          |                           |                         |\n| us-west4-a                |                                              |                           |                         |\n| us-west4-b                |                                              |                           |                         |\n| us-west4-c                |\tLas Vegas, Nevada, North America             |                           |                         |\n\n * gpu_type: [The type of GPU to use](https://cloud.google.com/compute/docs/gpus). Note that A100s have to be used with [A2 machine types](https://cloud.google.com/compute/docs/gpus/create-vm-with-gpus#examples-add-gpu-a100), while the other GPU types can be configured with N1 machine types.\n * number_of_gpus: [The number of GPUs to attach to each instance](https://cloud.google.com/compute/docs/gpus)\n\n| GPU Model    | Configuration Name   | Compatible Machine Types | Number of GPUs |\n|--------------|----------------------|--------------------------|----------------|\n| NVIDIA® A100 | nvidia-tesla-a100    | A2                       | 1, 2, 4, 8, 16 |\n| NVIDIA® T4   | nvidia-tesla-t4      | N1                       | 1, 2, 4        |\n| NVIDIA® V100 | nvidia-tesla-v100    | N1                       | 1, 2, 4, 8     |\n| NVIDIA® P4   | nvidia-tesla-p4      | N1                       | 1, 2, 4        |\n| NVIDIA® P100 | nvidia-tesla-p100    | N1                       | 1, 2, 4        |\n| NVIDIA® K80  | nvidia-tesla-k80     | N1                       | 1, 2, 4, 8     |\n\n4. Additional configuration like disk type, disk size, firewall rules, image type, image family, VPC, startup scripts, and others can be set in the configuration file too.\n5. When running the script, you will see output in the logs about which regions and zones the instances will be created in, the names of instances, and whether a quota has been reached in a given region.\n\n## Clean Up\nThere is a `delete_instance` function in the script that will delete the instances passed in the `instance_details` parameter. Please be mindful of cleaning up instances with GPUs attached when these are no longer needed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoitintl%2Fgpu-finder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoitintl%2Fgpu-finder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoitintl%2Fgpu-finder/lists"}