GoogleCloudPlatform / GoogleCloudPlatform/cloud-builders
Running container on GCP instance via GirLab
- Dominant language
- Go
- Stars
- 1.5k
- Forks
- 616
- PR merge metrics
- No merged PRs in 30d
Description
Is it possible to to run a container from a gitlab pipeline on a gcp instance which has GPU? I know that I do
```
steps:
# build the container image
- name: 'gcr.io/cloud-builders/docker'
args: [ 'build', '--memory-swap', '-1', '-t', 'eu.gcr.io/$PROJECT_ID/${_IMAGE}', '.' ]
# push the container image
- name: 'gcr.io/cloud-builders/docker'
args: [ 'push', 'eu.gcr.io/$PROJECT_ID/${_IMAGE}']
# deploy to Cloud Run
- name: "gcr.io/cloud-builders/docker"
args: ['run', '--rm', \
'--gpus', 'all', \
'eu.gcr.io/$PROJECT_ID/${_IMAGE}', 'pytest']
```
It fails step 2 with error:
> [Gcloud docker --push or pull](docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].)
Basically I need to test the container with a machine with GPU, since the company gitlab runner does not support GPU
Contributor guide
Assessment
This issue has not been assessed yet.