GoogleCloudPlatform / GoogleCloudPlatform/cloud-builders

Running container on GCP instance via GirLab

Open
#887 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.