Skip to content

Instantly share code, notes, and snippets.

@yashb042
Created July 7, 2023 12:03
Show Gist options
  • Save yashb042/a333681734c3629340c873a1d06ecd75 to your computer and use it in GitHub Desktop.
Save yashb042/a333681734c3629340c873a1d06ecd75 to your computer and use it in GitHub Desktop.
#!/bin/bash
mkdir dependencies
#Download all required dependencies
python3 -m pip install -t dependencies/python/lib/python3.7/site-packages selenium==3.8.0
curl -SL https://chromedriver.storage.googleapis.com/2.37/chromedriver_linux64.zip > dependencies/chromedriver.zip
curl -SL https://github.com/adieuadieu/serverless-chrome/releases/download/v1.0.0-41/stable-headless-chromium-amazonlinux-2017-03.zip > dependencies/headless-chromium.zip
unzip dependencies/chromedriver.zip -d dependencies
unzip dependencies/headless-chromium.zip -d dependencies
rm dependencies/chromedriver.zip
rm dependencies/headless-chromium.zip
# Zip both chromedriver and headless-chromium into a single zip file using the following command:
zip -r dependencies/chromedriver.zip dependencies/chromedriver dependencies/headless-chromium
# Zip python/lib/python3.7/site-packages into a single zip file using the following command:
zip -r dependencies/python.zip dependencies/python/lib/python3.7/site-packages
cp dependencies/chromedriver.zip .
cp dependencies/python.zip .
#Clean up
rm -rf dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment