Skip to content

Instantly share code, notes, and snippets.

@crabba
Created January 5, 2024 15:58
Show Gist options
  • Save crabba/1b318d5aabfd7a3dfe0673d45c23389b to your computer and use it in GitHub Desktop.
Save crabba/1b318d5aabfd7a3dfe0673d45c23389b to your computer and use it in GitHub Desktop.
#! /usr/bin/env bash
# Set up venv inside a wdl directory
mkdir wdl
cd wdl
python3 -m venv venv
source ./venv/bin/activate
# AL2 version of openssl causes error
# miniwdl-run urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.0.2k-fips 26 Jan 2017'.
# https://stackoverflow.com/questions/76187256/importerror-urllib3-v2-0-only-supports-openssl-1-1-1-currently-the-ssl-modu
# sudo yum install openssl11 # Necessary?
pip3 install urllib3==1.26.6 # Downgrade from 2.0.7 ugh
# Install and configure Docker
sudo amazon-linux-extras install -y docker
sudo systemctl enable docker
sudo systemctl start docker
sudo usermod -a -G docker ec2-user
# Log out, log in to pick up user permissions
cd ~/wdl
source ./venv/bin/activate
cat > requirements.txt << EOF
miniwdl
EOF
pip3 install -r requirements.txt
# Modify miniwdl script to use our venv python rather than /usr/bin/python3
sed -i 's|/usr/bin/python3|/usr/bin/env python3|' ~/.local/bin/miniwdl
miniwdl run_self_test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment