Update cluster serving demo with copy_bom
This commit is contained in:
		
							parent
							
								
									cdb4ac560f
								
							
						
					
					
						commit
						7290cfa561
					
				
							
								
								
									
										23
									
								
								demos/cluster_serving/cluster_serving.yaml
									
									
									
									
									
										Normal file
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										23
									
								
								demos/cluster_serving/cluster_serving.yaml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| includes:  | ||||
|   - base.yaml | ||||
|   - java-11-openjdk-amd64.yaml | ||||
| targets:  | ||||
|   # copy flink | ||||
|   - target: /bin | ||||
|     copy: | ||||
|       - from: ../flink-${FLINK_VERSION} | ||||
|   - target: /opt | ||||
|     copy: | ||||
|       - dirs: | ||||
|         - ../flink-${FLINK_VERSION}/conf | ||||
|   # copy hosts and localtime | ||||
|   - target: /etc | ||||
|     copy:  | ||||
|       - files:  | ||||
|           - ../hosts | ||||
|           - /etc/localtime | ||||
|   # copy libnss_files | ||||
|   - target: /opt/occlum/glibc/lib | ||||
|     copy:  | ||||
|       - files:  | ||||
|           - /opt/occlum/glibc/lib/libnss_files.so.2 | ||||
| @ -21,17 +21,8 @@ init_instance() { | ||||
| 
 | ||||
| build_flink() { | ||||
|     # Copy JVM and class file into Occlum instance and build | ||||
|     mkdir -p image/usr/lib/jvm | ||||
|     cp -r /usr/lib/jvm/java-11-openjdk-amd64 image/usr/lib/jvm | ||||
|     cp /lib/x86_64-linux-gnu/libz.so.1 image/lib | ||||
|     cp $occlum_glibc/libdl.so.2 image/$occlum_glibc | ||||
|     cp $occlum_glibc/librt.so.1 image/$occlum_glibc | ||||
|     cp $occlum_glibc/libm.so.6 image/$occlum_glibc | ||||
|     cp $occlum_glibc/libnss_files.so.2 image/$occlum_glibc | ||||
|     cp -rf ../flink-${FLINK_VERSION}/* image/bin/ | ||||
|     cp -rf ../flink-${FLINK_VERSION}/conf image/opt/ | ||||
|     cp -rf /etc/java-11-openjdk image/etc/ | ||||
|     cp -rf ../hosts image/etc/ | ||||
|     rm -rf image | ||||
|     copy_bom -f ../cluster_serving.yaml --root image --include-dir /opt/occlum/etc/template | ||||
|     # build occlum | ||||
|     occlum build | ||||
| } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user