Fix build error of bigdl-llm-cpu (#10176)
* fix build error * fix build error * fix build error * fix build error
This commit is contained in:
		
							parent
							
								
									6e10d98a8d
								
							
						
					
					
						commit
						eca69a6022
					
				
					 1 changed files with 8 additions and 5 deletions
				
			
		| 
						 | 
					@ -56,17 +56,20 @@ RUN env DEBIAN_FRONTEND=noninteractive apt-get update && \
 | 
				
			||||||
    /root/miniconda3/condabin/conda init bash && \
 | 
					    /root/miniconda3/condabin/conda init bash && \
 | 
				
			||||||
    /bin/bash -c "source /root/.bashrc" && \
 | 
					    /bin/bash -c "source /root/.bashrc" && \
 | 
				
			||||||
    /root/miniconda3/condabin/conda create -n bigdl-speculative-py39 -y python=3.9
 | 
					    /root/miniconda3/condabin/conda create -n bigdl-speculative-py39 -y python=3.9
 | 
				
			||||||
SHELL ["/root/miniconda3/condabin/conda", "run", "-n", "bigdl-speculative-py39", "/bin/bash", "-c"]
 | 
					RUN cp /root/miniconda3/condabin/conda /usr/bin && \
 | 
				
			||||||
RUN cd /llm && \
 | 
					    conda init bash && \
 | 
				
			||||||
 | 
					    . ~/.bashrc && \
 | 
				
			||||||
 | 
					    conda activate bigdl-speculative-py39 && \
 | 
				
			||||||
 | 
					    cd /llm && \
 | 
				
			||||||
    pip3 install --no-cache-dir --upgrade torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu && \
 | 
					    pip3 install --no-cache-dir --upgrade torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu && \
 | 
				
			||||||
    pip install --pre --upgrade bigdl-llm[all] && \
 | 
					    pip install --pre --upgrade bigdl-llm[all] && \
 | 
				
			||||||
    wget https://raw.githubusercontent.com/intel/intel-extension-for-pytorch/0c63936d7a6740679987920367ae2e0cdb375b2e/scripts/compile_bundle.sh && \
 | 
					    wget https://raw.githubusercontent.com/intel/intel-extension-for-pytorch/main/scripts/compile_bundle.sh && \
 | 
				
			||||||
    sed -i 's/VER_IPEX=main/VER_IPEX=0c63936d7a6740679987920367ae2e0cdb375b2e/g' "compile_bundle.sh" && \
 | 
					 | 
				
			||||||
    bash compile_bundle.sh && \
 | 
					    bash compile_bundle.sh && \
 | 
				
			||||||
    cd ./intel-extension-for-pytorch && \
 | 
					    cd ./intel-extension-for-pytorch && \
 | 
				
			||||||
    pip install -r requirements.txt && \
 | 
					    pip install -r requirements.txt && \
 | 
				
			||||||
    pip install transformers==4.36.2 && \
 | 
					    pip install transformers==4.36.2 && \
 | 
				
			||||||
    pip install transformers_stream_generator && \
 | 
					    pip install transformers_stream_generator && \
 | 
				
			||||||
 | 
					    cd /llm && \
 | 
				
			||||||
    rm -rf llvm-project llvm-release intel-extension-for-pytorch compile_bundle.sh && \
 | 
					    rm -rf llvm-project llvm-release intel-extension-for-pytorch compile_bundle.sh && \
 | 
				
			||||||
    echo "conda deactivate" >> /root/.bashrc
 | 
					    echo "conda deactivate" >> /root/.bashrc
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue