| 
									
										
										
										
											2023-05-05 20:40:05 +05:30
										 |  |  | #!/bin/bash
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | set -euxo pipefail | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ./metadata-ingestion/scripts/install_deps.sh | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-11 13:23:57 -07:00
										 |  |  | # Set up java version for gradle | 
					
						
							| 
									
										
										
										
											2024-12-16 22:12:37 +05:30
										 |  |  | yum install java-17-amazon-corretto-devel -y | 
					
						
							|  |  |  | javac --version | 
					
						
							| 
									
										
										
										
											2024-07-11 13:23:57 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-05 20:40:05 +05:30
										 |  |  | # Build python from source. | 
					
						
							|  |  |  | # Amazon Linux 2 has Python 3.8, but it's version of OpenSSL is super old and hence it | 
					
						
							|  |  |  | # doesn't work with the packages we use. As such, we have to build Python from source. | 
					
						
							|  |  |  | # TODO: This process is extremely slow - ideally we should cache the built Python binary | 
					
						
							|  |  |  | # for reuse. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | yum groupinstall "Development Tools" -y | 
					
						
							| 
									
										
										
										
											2024-07-11 13:23:57 -07:00
										 |  |  | yum install openssl openssl-devel libffi-devel bzip2-devel wget nodejs -y | 
					
						
							| 
									
										
										
										
											2023-05-05 20:40:05 +05:30
										 |  |  | 
 | 
					
						
							|  |  |  | wget https://www.python.org/ftp/python/3.10.11/Python-3.10.11.tgz | 
					
						
							|  |  |  | tar -xf Python-3.10.11.tgz | 
					
						
							|  |  |  | cd Python-3.10.11 | 
					
						
							|  |  |  | ./configure #--enable-optimizations | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | make -j $(nproc) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | make install | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Set python3.10 as the default version. | 
					
						
							|  |  |  | py3="$(which python3)" | 
					
						
							|  |  |  | rm "$py3" | 
					
						
							|  |  |  | ln "$(which python3.10)" "$py3" | 
					
						
							|  |  |  | python3 --version | 
					
						
							|  |  |  | 
 |