-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Multi-Architecture Support (x86_64, arm64) for Benchmarks (#227)
* [Feat] Added architecture parameter in config file [x86_64 or arm64] * [Fix] Change python version to 3.7 * [Feat] Changed python installter to check for architecture and install the package accordingly. * [Feat] Get architecture and pass that as paramter while creating lambda function. * [Feat] Pass architecture paramter while running the docker container. * [Feat] Add architecture in config deserializer. * [Feat] Add architecture support. * [Feat] Add requirement for arm for 210.thumbnailer * [Feat] Add requirement for arm for 501.graph-pagerank * [Feat] Add requirement for arm for 502.graph-mst * [Feat] Add requirement for arm for 503.graph-bfs * [Feat] Add requirement for arm for 504.dna-visualisation * [Feat] Add architecture support build for ffmpeg for 220.vide-processing * Fail early in case of architecutre is not suppoerted in the platform. * Add Architecture paramter when installing npm packages * Testing NodeJS ( Multi architecture support) * Upgrage version of sharp as previous 0.28 version didnt had the prebuilt arm libraries * Add approprivate version for python3.9 arm * [dev] Linting * [Feat] Fix order of parameters * [Feat] Support AWS arm64 architecture also when updating functions * [Feat] Add architecture to function name on AWS * [Feat] Separate cached code packages and output directories based on architecture * [Feat] Rename x86_64 to a simpler x64 * [Feat] Fix incorrect cache creation * [system] Fix major bug in cache handling - we failed to update size of new code package * [Feat] Adapt regression system to work with regression * [Feat] Add architecture to code packages uploaded to cloud storage * [dev] Linting * [Feat] Fix paths to code packages in S3 * [Feat] Support Python 3.10 on ARM * [Feat] Fix build of 504.dna-visualization on ARM where one package blows up code package size * [aws] Implement backoff for AWS API that has a low limit on the number of concurrent requests * [Feat] Expand docs --------- Co-authored-by: prajinkhadka <prawjeenkhadka@gmail.com>
- Loading branch information
1 parent
02ec0ba
commit 4f7c5dd
Showing
29 changed files
with
345 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,6 @@ | |
"author": "", | ||
"license": "", | ||
"dependencies": { | ||
"sharp": "^0.28" | ||
"sharp": "^0.32" | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
benchmarks/200.multimedia/210.thumbnailer/python/requirements.txt.arm.3.8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Pillow==10.0.0 |
1 change: 1 addition & 0 deletions
1
benchmarks/200.multimedia/210.thumbnailer/python/requirements.txt.arm.3.9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Pillow==10.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
benchmarks/500.scientific/501.graph-pagerank/python/requirements.txt.arm.3.8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python-igraph==0.11.4 |
1 change: 1 addition & 0 deletions
1
benchmarks/500.scientific/501.graph-pagerank/python/requirements.txt.arm.3.9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python-igraph==0.11.4 |
1 change: 1 addition & 0 deletions
1
benchmarks/500.scientific/502.graph-mst/python/requirements.txt.arm.3.8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python-igraph==0.11.4 |
1 change: 1 addition & 0 deletions
1
benchmarks/500.scientific/502.graph-mst/python/requirements.txt.arm.3.9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python-igraph==0.11.4 |
1 change: 1 addition & 0 deletions
1
benchmarks/500.scientific/503.graph-bfs/python/requirements.txt.arm.3.8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python-igraph==0.11.4 |
1 change: 1 addition & 0 deletions
1
benchmarks/500.scientific/503.graph-bfs/python/requirements.txt.arm.3.9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python-igraph==0.11.4 |
21 changes: 21 additions & 0 deletions
21
benchmarks/500.scientific/504.dna-visualisation/python/package.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Some dependencies have broken wheels | ||
# For example, pandas wheel for 3.10 and arm ships libraries | ||
# for all Linux versions and all Python versions | ||
# This is too much for Lambda | ||
|
||
PACKAGE_DIR=$1 | ||
echo "Original size $(du -sh $1 | cut -f1)" | ||
|
||
CUR_DIR=$(pwd) | ||
cd $1 | ||
|
||
# remove libraries for musl | ||
find . -name "*aarch64-linux-musl.so" | xargs rm | ||
|
||
version=$(echo "${PYTHON_VERSION}" | sed 's/\.//g') | ||
echo "versions ${PYTHON_VERSION} ${version}" | ||
# remove libraries for other Python versions | ||
find . -name "*aarch64-linux-gnu.so" | grep -v ${version} | xargs rm | ||
|
||
cd ${CUR_DIR} | ||
echo "Stripped size $(du -sh $1 | cut -f1)" |
1 change: 1 addition & 0 deletions
1
benchmarks/500.scientific/504.dna-visualisation/python/requirements.txt.arm.3.8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
squiggle==0.3.1 |
1 change: 1 addition & 0 deletions
1
benchmarks/500.scientific/504.dna-visualisation/python/requirements.txt.arm.3.9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
squiggle==0.3.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
#!/bin/bash | ||
|
||
if [ -f $FILE ]; then | ||
if [ -f /nvm/nvm.sh ]; then | ||
. /nvm/nvm.sh | ||
fi | ||
cd /mnt/function && npm install && rm -rf package-lock.json | ||
# | ||
cd /mnt/function | ||
|
||
if [ "${TARGET_ARCHITECTURE}" == "arm64" ]; then | ||
npm install --arch=arm64 | ||
elif [ "${TARGET_ARCHITECTURE}" = "x64" ]; then | ||
npm install --arch=x64 | ||
else | ||
echo "Unsupported architecture: $TARGET_ARCHITECTURE" | ||
exit 1 | ||
fi | ||
|
||
rm -rf package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,28 @@ | ||
#!/bin/bash | ||
|
||
cd /mnt/function\ | ||
&& if test -f "requirements.txt.${PYTHON_VERSION}"; then pip3 -q install -r requirements.txt -r requirements.txt.${PYTHON_VERSION} -t .python_packages/lib/site-packages ; else pip3 -q install -r requirements.txt -t .python_packages/lib/site-packages ; fi\ | ||
&& if test -f "${SCRIPT_FILE}"; then /bin/bash ${SCRIPT_FILE} .python_packages/lib/site-packages ; fi | ||
cd /mnt/function | ||
|
||
PLATFORM_ARG="" | ||
if [[ "${TARGET_ARCHITECTURE}" == "arm64" ]]; then | ||
PLATFORM_ARG="--platform manylinux_2_17_aarch64 --only-binary=:all:" | ||
fi | ||
|
||
if [[ "${TARGET_ARCHITECTURE}" == "arm64" ]] && [[ -f "requirements.txt.arm.${PYTHON_VERSION}" ]]; then | ||
|
||
pip3 -q install ${PLATFORM_ARG} -r requirements.txt.arm.${PYTHON_VERSION} -t .python_packages/lib/site-packages | ||
|
||
elif [[ -f "requirements.txt.${PYTHON_VERSION}" ]]; then | ||
|
||
pip3 -q install ${PLATFORM_ARG} -r requirements.txt.${PYTHON_VERSION} -t .python_packages/lib/site-packages | ||
|
||
else | ||
|
||
pip3 -q install ${PLATFORM_ARG} -r requirements.txt -t .python_packages/lib/site-packages | ||
|
||
fi | ||
|
||
if [[ -f "${SCRIPT_FILE}" ]]; then | ||
/bin/bash ${SCRIPT_FILE} .python_packages/lib/site-packages | ||
fi | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.