You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by dg...@apache.org on 2021/01/28 09:50:50 UTC
[incubator-datalab] 06/11: [DATALAB-2233]: upd gpu for dataproc
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch DATALAB-2233
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit dfe19b4cff9ca8f32bca6b0e9cd853df126517bc
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Wed Jan 27 12:45:23 2021 +0200
[DATALAB-2233]: upd gpu for dataproc
---
...utational-resource-create-dialog.component.html | 177 +++++++++++----------
...mputational-resource-create-dialog.component.ts | 14 +-
.../computational-resource-create.model.ts | 9 +-
3 files changed, 99 insertions(+), 101 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.html
index 238d685..5972089 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.html
@@ -146,7 +146,94 @@
</div>
</div>
- <div class="preemptible checkbox-group control-group"
+ <div class="checkbox-group control-group"
+ *ngIf="PROVIDER === 'gcp' && selectedImage?.image === 'docker.datalab-dataengine-service'">
+ <div class="d-flex cursor-pointer label m-bott-20" (click)="openBlock('gpu')">
+ <div class="empty-checkbox ml-10" [ngClass]="{'checked': isBlockOpen.gpu}">
+ <span class="checked-checkbox" *ngIf="isBlockOpen.gpu"></span>
+ </div>
+ <span class=" pl-5">GPU</span>
+ </div>
+ <div class="form-wrapper full-width" *ngIf="isBlockOpen.gpu">
+ <div class="col">
+ <div class="control-group">
+ <label class="label">Master GPU type</label>
+ <div class="control selector-wrapper">
+ <mat-form-field>
+ <mat-select formControlName="master_GPU_type" disableOptionCentering
+ placeholder="Select master GPU type">
+ <mat-option *ngFor="let type of selectedImage.gpu_types.masterGPUType"
+ [value]="type" (click)="setGpuCount('master', type)">
+ {{ type }}
+ </mat-option>
+ <mat-option *ngIf="!clusterTypes.length" class="multiple-select ml-10" disabled>Master GPU types list
+ is empty</mat-option>
+ </mat-select>
+ <button class="caret">
+ <i class="material-icons">keyboard_arrow_down</i>
+ </button>
+ </mat-form-field>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="label">Slave GPU type</label>
+ <div class="control selector-wrapper">
+ <mat-form-field>
+ <mat-label>Select slave GPU type</mat-label>
+ <mat-select formControlName="slave_GPU_сount" disableOptionCentering>
+ <mat-option *ngFor="let type of selectedImage.gpu_types.slaveGPUType" [value]="type" (click)="setGpuCount('master', type)">
+ {{ type }}
+ </mat-option>
+ <mat-option *ngIf="!selectedImage.gpu_types.slaveGPUType?.length" class="multiple-select ml-10" disabled>Slave GPU types list is empty</mat-option>
+ </mat-select>
+ <button class="caret">
+ <i class="material-icons">keyboard_arrow_down</i>
+ </button>
+ </mat-form-field>
+ </div>
+ </div>
+ </div>
+
+ <div class="col">
+ <div class="control-group">
+ <label class="label">Master GPU сount</label>
+ <div class="control selector-wrapper">
+ <mat-form-field>
+ <mat-label>Select master GPU type</mat-label>
+ <mat-select formControlName="master_GPU_type" disableOptionCentering >
+ <mat-option *ngFor="let type of masterGPUcount" [value]="type">
+ {{ type }}
+ </mat-option>
+ <mat-option *ngIf="!masterGPUcount?.length" class="multiple-select ml-10" disabled>Slave GPU types list is empty</mat-option>
+ </mat-select>
+ <button class="caret">
+ <i class="material-icons">keyboard_arrow_down</i>
+ </button>
+ </mat-form-field>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="label">Slave GPU сount</label>
+ <div class="control selector-wrapper">
+ <mat-form-field>
+ <mat-label>Select slave GPU сount</mat-label>
+ <mat-select formControlName="slave_GPU_сount" disableOptionCentering>
+ <mat-option *ngFor="let type of slaveGPUcount" [value]="type" (click)="setGpuCount('slave')">
+ {{ type }}
+ </mat-option>
+ <mat-option *ngIf="!selectedImage.gpu_types?.slaveGPUType?.length" class="multiple-select ml-10" disabled>Slave GPU types list is empty</mat-option>
+ </mat-select>
+ <button class="caret">
+ <i class="material-icons">keyboard_arrow_down</i>
+ </button>
+ </mat-form-field>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ </div>
+ <div class="preemptible checkbox-group control-group m-top-20"
*ngIf="PROVIDER === 'gcp' && selectedImage?.image === 'docker.datalab-dataengine-service'">
<!-- <label class="label">-->
<!-- <input #preemptibleNode type="checkbox" (change)="selectPreemptibleNodes($event)"/>-->
@@ -172,94 +259,8 @@
<ng-template #equal>Please manage total machines count.</ng-template>
</span>
</div>
- </div>
- <div class="checkbox-group control-group m-top-20"
- *ngIf="PROVIDER === 'gcp' && selectedImage?.image === 'docker.datalab-dataengine-service'">
- <div class="d-flex cursor-pointer label m-bott-20" (click)="openBlock('gpu')">
- <div class="empty-checkbox ml-10" [ngClass]="{'checked': isBlockOpen.gpu}">
- <span class="checked-checkbox" *ngIf="isBlockOpen.gpu"></span>
- </div>
- <span class=" pl-5">GPU</span>
- </div>
- <div class="form-wrapper full-width" *ngIf="isBlockOpen.gpu">
- <div class="col">
- <div class="control-group">
- <label class="label">Master GPU type</label>
- <div class="control selector-wrapper">
- <mat-form-field>
- <mat-select formControlName="master_GPU_type" disableOptionCentering
- placeholder="Select master GPU type">
- <mat-option *ngFor="let type of selectedImage.GPU.masterGPUType"
- [value]="type" (click)="setGpuCount('master', type)">
- {{ type }}
- </mat-option>
- <mat-option *ngIf="!clusterTypes.length" class="multiple-select ml-10" disabled>Master GPU types list
- is empty</mat-option>
- </mat-select>
- <button class="caret">
- <i class="material-icons">keyboard_arrow_down</i>
- </button>
- </mat-form-field>
- </div>
- </div>
- <div class="control-group">
- <label class="label">Slave GPU type</label>
- <div class="control selector-wrapper">
- <mat-form-field>
- <mat-label>Select slave GPU type</mat-label>
- <mat-select formControlName="slave_GPU_сount" disableOptionCentering>
- <mat-option *ngFor="let type of selectedImage.GPU.slaveGPUType" [value]="type" (click)="setGpuCount('master', type)">
- {{ type }}
- </mat-option>
- <mat-option *ngIf="!selectedImage.GPU.slaveGPUType?.length" class="multiple-select ml-10" disabled>Slave GPU types list is empty</mat-option>
- </mat-select>
- <button class="caret">
- <i class="material-icons">keyboard_arrow_down</i>
- </button>
- </mat-form-field>
- </div>
- </div>
- </div>
-
- <div class="col">
- <div class="control-group">
- <label class="label">Master GPU сount</label>
- <div class="control selector-wrapper">
- <mat-form-field>
- <mat-label>Select master GPU type</mat-label>
- <mat-select formControlName="master_GPU_type" disableOptionCentering >
- <mat-option *ngFor="let type of masterGPUcount" [value]="type">
- {{ type }}
- </mat-option>
- <mat-option *ngIf="!masterGPUcount?.length" class="multiple-select ml-10" disabled>Slave GPU types list is empty</mat-option>
- </mat-select>
- <button class="caret">
- <i class="material-icons">keyboard_arrow_down</i>
- </button>
- </mat-form-field>
- </div>
- </div>
- <div class="control-group">
- <label class="label">Slave GPU сount</label>
- <div class="control selector-wrapper">
- <mat-form-field>
- <mat-label>Select slave GPU сount</mat-label>
- <mat-select formControlName="slave_GPU_сount" disableOptionCentering>
- <mat-option *ngFor="let type of slaveGPUcount" [value]="type" (click)="setGpuCount('slave')">
- {{ type }}
- </mat-option>
- <mat-option *ngIf="!selectedImage.GPU.slaveGPUType?.length" class="multiple-select ml-10" disabled>Slave GPU types list is empty</mat-option>
- </mat-select>
- <button class="caret">
- <i class="material-icons">keyboard_arrow_down</i>
- </button>
- </mat-form-field>
- </div>
- </div>
+ </div>
- </div>
- </div>
- </div>
<div class="checkbox-group control-group m-top-15" *ngIf="PROVIDER === 'aws'" [hidden]="!selectedImage.templates.length">
<div class="d-flex cursor-pointer label" (click)="openBlock('spotInstances')">
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts
index 1ef822b..01ea10c 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts
@@ -68,13 +68,6 @@ export class ComputationalResourceCreateDialogComponent implements OnInit {
configuration: false,
};
-
-
- // @ViewChild('spotInstancesCheck') spotInstancesSelect;
- // @ViewChild('preemptibleNode') preemptible;
- // @ViewChild('addGpu') addGpuForm;
- // @ViewChild('configurationNode') configuration;
-
constructor(
@Inject(MAT_DIALOG_DATA) public data: any,
public toastr: ToastrService,
@@ -96,6 +89,9 @@ export class ComputationalResourceCreateDialogComponent implements OnInit {
public selectImage($event) {
console.log(this.selectedImage);
this.selectedImage = $event;
+ this.selectedImage.gpu_types.slaveGPUType = ['nvidia-tesla-t4', 'nvidia-tesla-v100'];
+ this.selectedImage.gpu_types.masterGPUType = ['nvidia-tesla-t4', 'nvidia-tesla-v100'];
+ console.log('selectedImage', this.selectedImage.gpu_types);
this.filterShapes();
this.getComputationalResourceLimits();
@@ -173,8 +169,8 @@ export class ComputationalResourceCreateDialogComponent implements OnInit {
custom_tag: [this.notebook_instance.tags.custom_tag],
master_GPU_type: [''],
slave_GPU_type: [''],
- master_GPU_сount: [''],
- slave_GPU_сount: [''],
+ master_GPU_count: [''],
+ slave_GPU_count: [''],
});
}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create.model.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create.model.ts
index 06ee4e1..4581d59 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create.model.ts
@@ -61,10 +61,11 @@ export class ComputationalResourceModel {
dataproc_version: parameters.version,
config: config,
project: env.project,
- // custom_tag: parameters.custom_tag
- // custom_tag: parameters.custom_tag
- // custom_tag: parameters.custom_tag
- // custom_tag: parameters.custom_tag
+ custom_tag: parameters.custom_tag,
+ masterGPUType: parameters.master_GPU_type,
+ slaveGPUType: parameters.slave_GPU_type,
+ masterGPUCount: parameters.master_GPU_count,
+ slaveGPUCount: parameters.slave_GPU_count,
}, provider);
} else {
return this.userResourceService.createComputationalResource_Dataengine({
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org