Skip to content

Commit

Permalink
MAINT: Clean up shared resources in sVEP
Browse files Browse the repository at this point in the history
* Removed symlinks and created script for producing layers

* Lambda functions updated to use these layers to access shared resources instead of including in lambda build
  • Loading branch information
NickEdwards7502 committed Dec 10, 2024
1 parent c4dcf31 commit 6c90b1f
Show file tree
Hide file tree
Showing 143 changed files with 204 additions and 7,493 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,14 @@ terraform.tfstate
.idea/
.DS_Store
builds

# python lambda layers
layers/python_libraries/python
layers/binaries/bin/*
layers/binaries/lib/*

# Build files
*.zip
*.pyc
build
libraries
41 changes: 41 additions & 0 deletions init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
set -ex
REPOSITORY_DIRECTORY="${PWD}"
LIBRARIES="${REPOSITORY_DIRECTORY}/libraries"
SOURCE="${LIBRARIES}/source"

# Clean sbeacon-libraries
if [ -d "${LIBRARIES}" ]
then
rm -rf "${LIBRARIES}"
fi

mkdir "${LIBRARIES}"
mkdir "${SOURCE}"

#
# building lambda layers
#

# tabix
cd ${SOURCE}
git clone --recursive --depth 1 --branch develop https://github.com/samtools/htslib.git
cd htslib && autoreconf && ./configure --enable-libcurl && make
cd ${REPOSITORY_DIRECTORY}
mkdir -p layers/binaries/lib
mkdir -p layers/binaries/bin
# TODO check what libraries are missing and add only those
ldd ${SOURCE}/htslib/tabix | awk 'NF == 4 { system("cp " $3 " ./layers/binaries/lib") }'
cp ${SOURCE}/htslib/tabix ./layers/binaries/bin/

# bcftools
cd ${SOURCE}
git clone --recursive --depth 1 --branch develop https://github.com/samtools/bcftools.git
cd bcftools && autoreconf && ./configure && make
cd ${REPOSITORY_DIRECTORY}
mkdir -p layers/binaries/lib
mkdir -p layers/binaries/bin
ldd ${SOURCE}/bcftools | awk 'NF == 4 { system("cp " $3 " ./layers/binaries/lib") }'
cp ${SOURCE}/bcftools/bcftools ./layers/binaries/bin/

# python libraries layer
cd ${REPOSITORY_DIRECTORY}
2 changes: 1 addition & 1 deletion lambda/concat/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import boto3

from lambda_utils import get_sns_event, sns_publish
from shared.utils import get_sns_event, sns_publish


# AWS clients and resources
Expand Down
1 change: 0 additions & 1 deletion lambda/concat/lambda_utils.py

This file was deleted.

24 changes: 0 additions & 24 deletions lambda/concatPages/fsspec/__init__.py

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
21 changes: 0 additions & 21 deletions lambda/concatPages/fsspec/_version.py

This file was deleted.

Loading

0 comments on commit 6c90b1f

Please sign in to comment.