Skip to content

Commit

Permalink
[PPML] Add SGX plugin device readme (#5663)
Browse files Browse the repository at this point in the history
* add sgx plugin device readme
  • Loading branch information
hzjane authored Sep 7, 2022
1 parent 7778a22 commit b798dbc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ bash build-docker-image.sh
2. Download [Spark 3.1.2](https://archive.apache.org/dist/spark/spark-3.1.2/spark-3.1.2-bin-hadoop2.7.tgz), and setup `SPARK_HOME`.
3. `export kubernetes_master_url=your_k8s_master` or replace `${kubernetes_master_url}` with your k8s master url in `run_spark_xxx.sh`.
4. Modify `driver.yaml` and `executor.yaml` for your applications.
In our demo example, we mount SGX devices into container or pod. Mount device requires privileged: true. In production deployment, please use K8S SGX device plugin with device-plugin setting in yaml.

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ spec:
- name: spark-example
imagePullPolicy: Never
volumeMounts:
# - name: device-plugin
# mountPath: /var/lib/kubelet/device-plugins
- name: sgx-enclave
mountPath: /dev/sgx/enclave
- name: sgx-provision
Expand All @@ -30,6 +32,9 @@ spec:
- name: SGX_KERNEL_HEAP
value: "1GB"
volumes:
# - name: device-plugin
# hostPath:
# path: /var/lib/kubelet/device-plugins
- name: sgx-enclave
hostPath:
path: /dev/sgx_enclave
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ spec:
- name: spark-example
imagePullPolicy: Never
volumeMounts:
# - name: device-plugin
# mountPath: /var/lib/kubelet/device-plugins
- name: sgx-enclave
mountPath: /dev/sgx/enclave
- name: sgx-provision
Expand All @@ -30,6 +32,9 @@ spec:
- name: SGX_KERNEL_HEAP
value: "1GB"
volumes:
# - name: device-plugin
# hostPath:
# path: /var/lib/kubelet/device-plugins
- name: sgx-enclave
hostPath:
path: /dev/sgx_enclave
Expand Down

0 comments on commit b798dbc

Please sign in to comment.