Skip to content

Instantly share code, notes, and snippets.

@wbuchwalter
Created July 13, 2017 19:54
Show Gist options
  • Save wbuchwalter/c066ca55fd1e9099bdc16dd9ef4865de to your computer and use it in GitHub Desktop.
Save wbuchwalter/c066ca55fd1e9099bdc16dd9ef4865de to your computer and use it in GitHub Desktop.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: tensorflow
name: tensorflow
spec:
template:
metadata:
labels:
app: tensorflow
spec:
containers:
- name: tensorflow
image: tensorflow/tensorflow:latest-gpu
command: ["python main.py"]
imagePullPolicy: IfNotPresent
env:
- name: LD_LIBRARY_PATH
value: /usr/lib/nvidia:/usr/lib/x86_64-linux-gnu
resources:
requests:
alpha.kubernetes.io/nvidia-gpu: 1
limits:
alpha.kubernetes.io/nvidia-gpu: 1
volumeMounts:
- mountPath: /usr/local/nvidia/bin
name: bin
- mountPath: /usr/lib/nvidia
name: lib
- mountPath: /usr/lib/x86_64-linux-gnu/libcuda.so.1
name: libcuda
volumes:
- name: bin
hostPath:
path: /usr/lib/nvidia-378/bin
- name: lib
hostPath:
path: /usr/lib/nvidia-378
- name: libcuda
hostPath:
path: /usr/lib/x86_64-linux-gnu/libcuda.so.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment