This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: "mlkube.io/v1beta1" | |
| kind: TfJob | |
| metadata: | |
| name: whatev | |
| spec: | |
| replica_specs: | |
| - replicas: 1 | |
| tf_port: 2222 | |
| tf_replica_type: MASTER | |
| template: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: batch/v1 | |
| kind: Job | |
| metadata: | |
| name: nvidia-smi | |
| spec: | |
| template: | |
| metadata: | |
| name: nvidia-smi | |
| spec: | |
| restartPolicy: Never |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: "mlkube.io/v1beta1" | |
| kind: "TfJob" | |
| metadata: | |
| name: {{ .Release.Name }} | |
| spec: | |
| replica_specs: | |
| - replicas: 1 | |
| tf_port: 2222 | |
| tf_replica_type: MASTER | |
| template: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| labels: | |
| app: tensorflow | |
| name: tensorflow | |
| spec: | |
| template: | |
| metadata: | |
| labels: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| labels: | |
| app: tensorflow | |
| name: tensorflow | |
| spec: | |
| template: | |
| metadata: | |
| labels: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| name: autoscaler | |
| spec: | |
| replicas: 1 | |
| template: | |
| metadata: | |
| labels: | |
| app: autoscaler |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| labels: | |
| app: nginx | |
| name: nginx | |
| spec: | |
| ports: | |
| - port: 80 | |
| targetPort: 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| apt-get update | |
| apt-get install -y gcc | |
| apt-get install -y make | |
| apt-get install -qqy linux-headers-`uname -r` | |
| wget -P /tools http://us.download.nvidia.com/XFree86/Linux-x86_64/375.20/NVIDIA-Linux-x86_64-375.20.run | |
| chmod +x /tools/NVIDIA-Linux-x86_64-375.20.run | |
| sh /tools/NVIDIA-Linux-x86_64-375.20.run -a -s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| labels: | |
| app: tensorboard | |
| name: tensorboard | |
| spec: | |
| ports: | |
| - port: 80 | |
| targetPort: 6006 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def save_model(saver, sess, counter, path): | |
| if not os.path.isdir(path): | |
| os.makedirs(path) | |
| path = os.path.join(path, 'model.ckpt') | |
| saver.save(sess, path, global_step=counter) | |
| return path | |
| if np.mod(counter, 50) == 0: | |
| save_path = save_model(saver, sess, counter, log_directory) |