fix qlora-finetune Dockerfile (#10379)
This commit is contained in:
		
							parent
							
								
									cac96b00be
								
							
						
					
					
						commit
						146b77f113
					
				
					 5 changed files with 7 additions and 6 deletions
				
			
		| 
						 | 
					@ -46,10 +46,8 @@ RUN mkdir -p /bigdl/data && mkdir -p /bigdl/model && \
 | 
				
			||||||
    rm -r BigDL && \
 | 
					    rm -r BigDL && \
 | 
				
			||||||
    chown -R mpiuser /bigdl
 | 
					    chown -R mpiuser /bigdl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# for docker directly run example
 | 
					# for standalone
 | 
				
			||||||
COPY ./start-qlora-finetuning-on-cpu.sh /bigdl/start-qlora-finetuning-on-cpu.sh
 | 
					COPY ./start-qlora-finetuning-on-cpu.sh /bigdl/start-qlora-finetuning-on-cpu.sh
 | 
				
			||||||
# for k8s
 | 
					 | 
				
			||||||
COPY ./bigdl-qlora-finetuing-entrypoint.sh /bigdl/bigdl-qlora-finetuing-entrypoint.sh
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
USER mpiuser
 | 
					USER mpiuser
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -65,8 +65,8 @@ RUN mkdir -p /bigdl/data && mkdir -p /bigdl/model && \
 | 
				
			||||||
    rm -r BigDL && \
 | 
					    rm -r BigDL && \
 | 
				
			||||||
    chown -R mpiuser /bigdl
 | 
					    chown -R mpiuser /bigdl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# for standalone
 | 
					# for k8s
 | 
				
			||||||
COPY ./start-qlora-finetuning-on-cpu.sh /bigdl/start-qlora-finetuning-on-cpu.sh
 | 
					COPY ./bigdl-qlora-finetuing-entrypoint.sh /bigdl/bigdl-qlora-finetuing-entrypoint.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
USER mpiuser
 | 
					USER mpiuser
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,7 +20,7 @@ then
 | 
				
			||||||
    -f /home/mpiuser/hostfile \
 | 
					    -f /home/mpiuser/hostfile \
 | 
				
			||||||
    -iface eth0 \
 | 
					    -iface eth0 \
 | 
				
			||||||
    --bind-to socket \
 | 
					    --bind-to socket \
 | 
				
			||||||
    -genv OMP_NUM_THREADS=48 \
 | 
					    -genv OMP_NUM_THREADS=$OMP_NUM_THREADS \
 | 
				
			||||||
    -genv KMP_AFFINITY="granularity=fine,none" \
 | 
					    -genv KMP_AFFINITY="granularity=fine,none" \
 | 
				
			||||||
    -genv KMP_BLOCKTIME=1 \
 | 
					    -genv KMP_BLOCKTIME=1 \
 | 
				
			||||||
    -genv TF_ENABLE_ONEDNN_OPTS=1 \
 | 
					    -genv TF_ENABLE_ONEDNN_OPTS=1 \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,6 +43,8 @@ spec:
 | 
				
			||||||
               value: "{{ .Values.httpProxy }}"
 | 
					               value: "{{ .Values.httpProxy }}"
 | 
				
			||||||
             - name: https_proxy
 | 
					             - name: https_proxy
 | 
				
			||||||
               value: "{{ .Values.httpsProxy }}"
 | 
					               value: "{{ .Values.httpsProxy }}"
 | 
				
			||||||
 | 
					             - name: OMP_NUM_THREADS
 | 
				
			||||||
 | 
					               value: "{{ .Values.omp_num_threads}}"
 | 
				
			||||||
             - name: LOCAL_POD_NAME
 | 
					             - name: LOCAL_POD_NAME
 | 
				
			||||||
               valueFrom:
 | 
					               valueFrom:
 | 
				
			||||||
                 fieldRef:
 | 
					                 fieldRef:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,5 +6,6 @@ nfsServerIp: your_nfs_server_ip
 | 
				
			||||||
nfsPath: a_nfs_shared_folder_path_on_the_server
 | 
					nfsPath: a_nfs_shared_folder_path_on_the_server
 | 
				
			||||||
dataSubPath: alpaca_data_cleaned_archive.json # a subpath of the data file under nfs directory
 | 
					dataSubPath: alpaca_data_cleaned_archive.json # a subpath of the data file under nfs directory
 | 
				
			||||||
modelSubPath: Llama-2-7b-chat-hf # a subpath of the model file (dir) under nfs directory
 | 
					modelSubPath: Llama-2-7b-chat-hf # a subpath of the model file (dir) under nfs directory
 | 
				
			||||||
 | 
					omp_num_threads: 48 # configure this value based on the number of CPU cores
 | 
				
			||||||
httpProxy: "your_http_proxy_like_http://xxx:xxxx_if_needed_else_empty"
 | 
					httpProxy: "your_http_proxy_like_http://xxx:xxxx_if_needed_else_empty"
 | 
				
			||||||
httpsProxy: "your_https_proxy_like_http://xxx:xxxx_if_needed_else_empty"
 | 
					httpsProxy: "your_https_proxy_like_http://xxx:xxxx_if_needed_else_empty"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue