[ORCA] K8s Tutorial Update (#7710)
* fix k8s tutorial style * update command
This commit is contained in:
		
							parent
							
								
									feacade38c
								
							
						
					
					
						commit
						a1ee2f8b68
					
				
					 1 changed files with 4 additions and 6 deletions
				
			
		| 
						 | 
					@ -135,7 +135,7 @@ def train_data_creator(config, batch_size):
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
### 2 Pull Docker Image
 | 
					## 2 Pull Docker Image
 | 
				
			||||||
Please pull the BigDL [`bigdl-k8s`](https://hub.docker.com/r/intelanalytics/bigdl-k8s/tags) image (built on top of Spark 3.1.3) from Docker Hub beforehand as follows:
 | 
					Please pull the BigDL [`bigdl-k8s`](https://hub.docker.com/r/intelanalytics/bigdl-k8s/tags) image (built on top of Spark 3.1.3) from Docker Hub beforehand as follows:
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
# For the release version, e.g. 2.2.0
 | 
					# For the release version, e.g. 2.2.0
 | 
				
			||||||
| 
						 | 
					@ -381,7 +381,7 @@ ${SPARK_HOME}/bin/spark-submit \
 | 
				
			||||||
    --driver-memory 2g \
 | 
					    --driver-memory 2g \
 | 
				
			||||||
    --archives /path/to/environment.tar.gz#environment \
 | 
					    --archives /path/to/environment.tar.gz#environment \
 | 
				
			||||||
    --conf spark.pyspark.driver.python=python \
 | 
					    --conf spark.pyspark.driver.python=python \
 | 
				
			||||||
    --conf spark.pyspark.python=./environment/bin/python \
 | 
					    --conf spark.pyspark.python=environment/bin/python \
 | 
				
			||||||
    --properties-file ${BIGDL_HOME}/conf/spark-bigdl.conf \
 | 
					    --properties-file ${BIGDL_HOME}/conf/spark-bigdl.conf \
 | 
				
			||||||
    --py-files ${BIGDL_HOME}/python/bigdl-spark_${SPARK_VERSION}-${BIGDL_VERSION}-python-api.zip,/path/to/model.py \
 | 
					    --py-files ${BIGDL_HOME}/python/bigdl-spark_${SPARK_VERSION}-${BIGDL_VERSION}-python-api.zip,/path/to/model.py \
 | 
				
			||||||
    --conf spark.driver.extraClassPath=${BIGDL_HOME}/jars/* \
 | 
					    --conf spark.driver.extraClassPath=${BIGDL_HOME}/jars/* \
 | 
				
			||||||
| 
						 | 
					@ -506,7 +506,7 @@ We define a Kubernetes Deployment in a YAML file. Some fields of the YAML are ex
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### 7.3.1 K8s Client
 | 
					#### 7.3.1 K8s Client
 | 
				
			||||||
BigDL has provided an example [orca-tutorial-k8s-client.yaml](https://github.com/intel-analytics/BigDL/blob/main/python/orca/tutorial/pytorch/docker/orca-tutorial-client.yaml) to directly run the Fashion-MNIST example for k8s-client mode.
 | 
					BigDL has provided an example [orca-tutorial-k8s-client.yaml](https://github.com/intel-analytics/BigDL/blob/main/python/orca/tutorial/pytorch/FashionMNIST/orca-tutorial-k8s-client.yaml) to directly run the Fashion-MNIST example for k8s-client mode.
 | 
				
			||||||
The environment variables for Spark (including SPARK_VERSION and SPARK_HOME) and BigDL (including BIGDL_VERSION and BIGDL_HOME) are already configured in the BigDL K8s Docker image.
 | 
					The environment variables for Spark (including SPARK_VERSION and SPARK_HOME) and BigDL (including BIGDL_VERSION and BIGDL_HOME) are already configured in the BigDL K8s Docker image.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
You need to uncompress the conda archive in NFS before submitting the job:
 | 
					You need to uncompress the conda archive in NFS before submitting the job:
 | 
				
			||||||
| 
						 | 
					@ -610,11 +610,9 @@ kubectl delete job orca-pytorch-job
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### 7.3.2 K8s Cluster
 | 
					#### 7.3.2 K8s Cluster
 | 
				
			||||||
BigDL has provided an example [orca-tutorial-k8s-cluster.yaml](https://github.com/intel-analytics/BigDL/blob/main/python/orca/tutorial/pytorch/docker/orca-tutorial-cluster.yaml) to run the Fashion-MNIST example for k8s-cluster mode.
 | 
					BigDL has provided an example [orca-tutorial-k8s-cluster.yaml](https://github.com/intel-analytics/BigDL/blob/main/python/orca/tutorial/pytorch/FashionMNIST/orca-tutorial-k8s-cluster.yaml) to run the Fashion-MNIST example for k8s-cluster mode.
 | 
				
			||||||
The environment variables for Spark (including SPARK_VERSION and SPARK_HOME) and BigDL (including BIGDL_VERSION and BIGDL_HOME) are already configured in the BigDL K8s Docker image.
 | 
					The environment variables for Spark (including SPARK_VERSION and SPARK_HOME) and BigDL (including BIGDL_VERSION and BIGDL_HOME) are already configured in the BigDL K8s Docker image.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
*orca-tutorial-k8s-cluster.yaml*
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
apiVersion: batch/v1
 | 
					apiVersion: batch/v1
 | 
				
			||||||
kind: Job
 | 
					kind: Job
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue