-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do we need different credential for creating runner and access GCS #386
Comments
You do need to do something different, the The fastest method would be the add the google auth action like so: training:
name: Training and Reporting
needs:
- deploy-runner
runs-on: [self-hosted, gpu_runner]
steps:
- uses: actions/checkout@v2
- uses: iterative/setup-cml@v1
- uses: iterative/setup-dvc@v1
- uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v0'
with:
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_DATA }}
- name: Training
env:
repo_token: ${{ secrets.REPO_ACCESS_TOKEN }}
run: |
# Pull dataset with DVC
dvc pull data
# Reproduce pipeline if any changes detected in dependencies
dvc repro
alternatively you can assgin the cml runner created instance a service account like so: jobs:
deploy-runner:
runs-on: ubuntu-20.04
steps:
- uses: iterative/setup-cml@v1
- uses: actions/checkout@v2
- name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v0'
with:
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_DATA }}
- name: Deploy runner on GCP
env:
REPO_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
run: |
cml runner \
--cloud=gcp \
--cloud-region=us-central1-a \
--cloud-type=n1-highmem-2 \
--labels=gpu_runner \
--single=true \
--cloud-gpu=nvidia-tesla-t4 \
--cloud-spot=false \
--cloud-hdd-size=128 \
--cloud-permission-set=SERVICE_ACCOUNT@PROJECT_ID.iam.gserviceaccount.com,scopes=storage-rw
training:
name: Training and Reporting
needs:
- deploy-runner
runs-on: [self-hosted, gpu_runner]
steps:
- uses: actions/checkout@v2
- uses: iterative/setup-cml@v1
- uses: iterative/setup-dvc@v1
- uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Training
env:
repo_token: ${{ secrets.REPO_ACCESS_TOKEN }}
run: |
# Pull dataset with DVC
dvc pull data
# Reproduce pipeline if any changes detected in dependencies
dvc repro |
@dacbd Thanks it's solved the issue. And I think the documentation should be updated accordingly |
I have the following GitHub action file,
The
deploy-runner:
job working without any issue buttraining
job fail indvc pull data
and it's give the following errorAccording to the documentation cloud-storage-provider-credentials the
GCS
environment variable isGOOGLE_APPLICATION_CREDENTIALS
but i'm usingGOOGLE_APPLICATION_CREDENTIALS_DATA
is this the issue or i'm missing somethingThanks
The text was updated successfully, but these errors were encountered: