-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Support of Google Cloud Storage for cloud storage #3561
Conversation
Implement GoogleCloudStorage and add KEY_FILE_PATH to CredentialsTypeChoice, and key_file_path in Credentials
@jasonkit , thanks for the contribution. Please give us some time to review the PR. We are in the process of adding UI for the feature. @Marishka17 , please review the PR next week. |
@jasonkit , Hi. Thanks for the contribution, please give me some time to test the functionality of the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job, I have only one small comment: i don`t see the migration file, could you please add it?
try: | ||
self._bucket = self._storage_client.create_bucket( | ||
self.bucket, | ||
location=self._bucket_location |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it work if location == None
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, location
is indeed an optional argument for create_bucket
, if location
is None
, it will default to us
@Marishka17 |
Thank you for the contribution! |
Motivation and context
Add Google Cloud Storage support for cloud storage.
Also update
Credentials
class to includekey_file_path
andadd
KEY_FILE_PATH
as a new credential type which is required for usinggoogle cloud storage.
It is expected to set the
key_file_path
to the Google cloud's service account key json file.The
specific_attributes
for Google Cloud Storage includes:prefix
: key prefix for filtering blobs that going to fetch during initialize_content()location
: The location of bucket if we are going to create a bucketproject
: The Google Cloud project id the bucket if we are going to create a bucketAll of the above attributes are optional.
How has this been tested?
Tested manually.
Tested sending HTTP POST to
/api/v1/cloudstorages
with following bodyand confirmed the cloudstorages record could be created on DB
To make this call works, we need to ensure
/credentials/gcs.json
exists on cvat serverand this service account key json file should has permission to access gs://my_bucket
Also tested creating new task data with using this newly created cloud storage
by sending HTTP POST to
/api/v1/tasks/:task_id/data
with following bodyand confirmed the task could be created, and the all the images could be loaded.
Checklist
develop
branchcvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.