Skip to content

Commit 9bb835b

Browse files
committed
Build system refactoring #4
1 parent 01e912a commit 9bb835b

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

build/libtorch-arm/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ RUN cd pytorch ;\
4141
python3 setup.py install
4242

4343
ADD ./deps/readies/ /build/deps/
44-
ADD ./collect.py /build/
44+
ADD ./build/libtorch-arm/collect.py /build/
4545

46-
RUN ./collect.py
46+
RUN ./collect.py
4747

4848
RUN [ "cross-build-end" ]

build/libtorch-arm/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
.PHONY: build pack publish
3+
4+
VERSION=1.1.0
5+
6+
S3_URL=redismodules/pytorch
7+
8+
build:
9+
@docker build -t redisfab/libtorch-arm64v8:$(VERSION) -f build/libtorch-arm/Dockerfile ../..
10+
11+
pack:
12+
@PT_VERSION=$(VERSION) ./repack.sh
13+
14+
publish:
15+
@aws s3 cp libtorch-cpu-linux-arm64v8-$(VERSION).tar.gz s3://$(S3_URL)/ --acl public-read
16+
@aws s3 cp libtorch-cpu-linux-arm32v7-$(VERSION).tar.gz s3://$(S3_URL)/ --acl public-read

build/libtorch-arm/collect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def collect_pytorch():
7272
copy_p(f, d_pytorch/'lib')
7373
with cwd(pytorch/'torch'):
7474
shutil.copytree('share', d_pytorch/'share', ignore_dangling_symlinks=True)
75-
create_tar(f'libtorch-{pt_build}-{pt_os}-{pt_arch}-{pt_ver}.tar.gz', dest, 'libtorch')
75+
create_tar('libtorch-{}-{}-{}-{}.tar.gz'.format(pt_build, pt_os, pt_arch, pt_ver), dest, 'libtorch')
7676

7777
#----------------------------------------------------------------------------------------------
7878

0 commit comments

Comments
 (0)