-
Notifications
You must be signed in to change notification settings - Fork 710
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* #71 simplify accelerators config * Add a cloud value that accepts gke or azure and will create the corresponding ConfigMap * Users can create the config manually and not specify a cloud option in order to have complete control of the config.
- Loading branch information
1 parent
ed770b4
commit 6d8f9f9
Showing
5 changed files
with
96 additions
and
54 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{{- $cloud := .Values.cloud | default "" -}} | ||
|
||
{{ if eq $cloud "azure" }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: tf-job-operator-config | ||
namespace: default | ||
data: | ||
controller_config_file.yaml: | | ||
grpcServerFilePath: /opt/mlkube/grpc_tensorflow_server/grpc_tensorflow_server.py | ||
accelerators: | ||
alpha.kubernetes.io/nvidia-gpu: | ||
envVars: | ||
- name: LD_LIBRARY_PATH | ||
value: /usr/lib/nvidia:/usr/lib/x86_64-linux-gnu | ||
volumes: | ||
- name: lib | ||
mountPath: /usr/lib/nvidia | ||
hostPath: /usr/lib/nvidia-384 | ||
- name: bin | ||
mountPath: /usr/local/nvidia/bin | ||
hostPath: /usr/lib/nvidia-384/bin | ||
- name: libcuda | ||
mountPath: /usr/lib/x86_64-linux-gnu/libcuda.so.1 | ||
hostPath: /usr/lib/x86_64-linux-gnu/libcuda.so.1 | ||
{{ else if eq $cloud "gke" }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: tf-job-operator-config | ||
namespace: default | ||
data: | ||
controller_config_file.yaml: | | ||
grpcServerFilePath: /opt/mlkube/grpc_tensorflow_server/grpc_tensorflow_server.py | ||
accelerators: | ||
alpha.kubernetes.io/nvidia-gpu: | ||
volumes: | ||
- name: nvidia-libraries | ||
mountPath: /usr/local/nvidia/lib64 # This path is special; it is expected to be present in `/etc/ld.so.conf` inside the container image. | ||
hostPath: /home/kubernetes/bin/nvidia/lib | ||
- name: nvidia-debug-tools # optional | ||
mountPath: /usr/local/bin/nvidia | ||
hostPath: /home/kubernetes/bin/nvidia/bin | ||
{{ end }} |
This file contains 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
This file contains 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