Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions get_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,17 @@ else
fi
fi

git submodule update --init --recursive || true
#git submodule update --init --recursive || true

if [ -f ${HERE}/opt/readies/bin/platform ]; then
OS=$(python3 $HERE/opt/readies/bin/platform --os)
ARCH=$(python3 $HERE/opt/readies/bin/platform --arch)
else
OS=`uname -s | tr '[:upper:]' '[:lower:]'`
uname -m|grep aarch64 || ARCH=x64
uname -m|grep x86 || ARCH=arm64v8
fi

OS=$(python3 $HERE/opt/readies/bin/platform --os)
ARCH=$(python3 $HERE/opt/readies/bin/platform --arch)

# avoid wget warnings on macOS
[[ $OS == macos ]] && export LC_ALL=en_US.UTF-8
Expand Down Expand Up @@ -235,7 +242,7 @@ if [[ $WITH_PT != 0 ]]; then
LIBTORCH_ARCHIVE=libtorch-${PT_BUILD}-${PT_OS}-${PT_ARCH}-${PT_VERSION}.tar.gz

if [[ $PT_REPACK == 1 ]]; then
PT_VERSION=$PT_VERSION GPU=$GPU $HERE/opt/build/libtorch/repack.sh
PT_VERSION=$PT_VERSION GPU=$GPU OS=${OS} ARCH=${ARCH} $HERE/opt/build/libtorch/repack.sh
else
LIBTORCH_URL=https://s3.amazonaws.com/redismodules/pytorch/$LIBTORCH_ARCHIVE

Expand Down
11 changes: 8 additions & 3 deletions opt/build/libtorch/repack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

ROOT=$HERE/../../..
. $ROOT/opt/readies/shibumi/functions
#. $ROOT/opt/readies/shibumi/functions
ROOT=$(realpath $ROOT)

if [[ "$1" == "cpu" || $CPU == 1 ]]; then
Expand All @@ -24,8 +24,13 @@ else
fi
fi

OS=$(python3 $ROOT/opt/readies/bin/platform --os)
ARCH=$(python3 $ROOT/opt/readies/bin/platform --arch)
# set them internally or externally
if [ -z ${OS} ]; then
OS=$(python3 $ROOT/opt/readies/bin/platform --os)
fi
if [ -z ${ARCH} ]; then
ARCH=$(python3 $ROOT/opt/readies/bin/platform --arch)
fi

TARGET_DIR=$ROOT/deps/$OS-$ARCH-$DEVICE

Expand Down