File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 47
47
fi
48
48
fi
49
49
50
- git submodule update --init --recursive || true
50
+ # git submodule update --init --recursive || true
51
+
52
+ if [ -f ${HERE} /opt/readies/bin/platform ]; then
53
+ OS=$( python3 $HERE /opt/readies/bin/platform --os)
54
+ ARCH=$( python3 $HERE /opt/readies/bin/platform --arch)
55
+ else
56
+ OS=` uname -s | tr ' [:upper:]' ' [:lower:]' `
57
+ uname -m| grep aarch64 || ARCH=x64
58
+ uname -m| grep x86 || ARCH=arm64v8
59
+ fi
51
60
52
- OS=$( python3 $HERE /opt/readies/bin/platform --os)
53
- ARCH=$( python3 $HERE /opt/readies/bin/platform --arch)
54
61
55
62
# avoid wget warnings on macOS
56
63
[[ $OS == macos ]] && export LC_ALL=en_US.UTF-8
@@ -235,7 +242,7 @@ if [[ $WITH_PT != 0 ]]; then
235
242
LIBTORCH_ARCHIVE=libtorch-${PT_BUILD} -${PT_OS} -${PT_ARCH} -${PT_VERSION} .tar.gz
236
243
237
244
if [[ $PT_REPACK == 1 ]]; then
238
- PT_VERSION=$PT_VERSION GPU=$GPU $HERE /opt/build/libtorch/repack.sh
245
+ PT_VERSION=$PT_VERSION GPU=$GPU OS= ${OS} ARCH= ${ARCH} $HERE /opt/build/libtorch/repack.sh
239
246
else
240
247
LIBTORCH_URL=https://s3.amazonaws.com/redismodules/pytorch/$LIBTORCH_ARCHIVE
241
248
Original file line number Diff line number Diff line change 6
6
HERE=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd) "
7
7
8
8
ROOT=$HERE /../../..
9
- . $ROOT /opt/readies/shibumi/functions
9
+ # . $ROOT/opt/readies/shibumi/functions
10
10
ROOT=$( realpath $ROOT )
11
11
12
12
if [[ " $1 " == " cpu" || $CPU == 1 ]]; then
24
24
fi
25
25
fi
26
26
27
- OS=$( python3 $ROOT /opt/readies/bin/platform --os)
28
- ARCH=$( python3 $ROOT /opt/readies/bin/platform --arch)
27
+ # set them internally or externally
28
+ if [ -z ${OS} ]; then
29
+ OS=$( python3 $ROOT /opt/readies/bin/platform --os)
30
+ fi
31
+ if [ -z ${ARCH} ]; then
32
+ ARCH=$( python3 $ROOT /opt/readies/bin/platform --arch)
33
+ fi
29
34
30
35
TARGET_DIR=$ROOT /deps/$OS -$ARCH -$DEVICE
31
36
You can’t perform that action at this time.
0 commit comments