Skip to content

Commit

Permalink
Modify to download the model previously
Browse files Browse the repository at this point in the history
  • Loading branch information
pperezredborder committed Jul 23, 2024
1 parent 819a7c1 commit 6d54112
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SOURCES and pkgs
SOURCES
pkgs

resources/model/*
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
all: rpm

rpm:
curl -L https://huggingface.co/Mozilla/llava-v1.5-7b-llamafile/resolve/main/llava-v1.5-7b-q4.llamafile?download=true -o resources/model/llava-v1.5-7b-q4.llamafile
$(MAKE) -C packaging/rpm

rpmtest:
Expand Down
6 changes: 1 addition & 5 deletions packaging/rpm/redborder-ai.spec
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ Requires: bash
mkdir -p %{buildroot}/etc/redborder
mkdir -p %{buildroot}/usr/lib/redborder/bin
cp resources/bin/* %{buildroot}/usr/lib/redborder/bin
wget https://huggingface.co/Mozilla/llava-v1.5-7b-llamafile/resolve/main/llava-v1.5-7b-q4.llamafile?download=true -P %{buildroot}/usr/lib/redborder/bin/
mv %{buildroot}/usr/lib/redborder/bin/llava-v1.5-7b-q4.llamafile\?download\=true %{buildroot}/usr/lib/redborder/bin/llava-v1.5-7b-q4.llamafile
cp resources/model/* %{buildroot}/usr/lib/redborder/bin
chmod 0755 %{buildroot}/usr/lib/redborder/bin/*
install -D -m 0644 resources/systemd/llamafile.service %{buildroot}/usr/lib/systemd/system/llamafile.service

Expand All @@ -36,9 +35,6 @@ systemctl daemon-reload
mkdir -p /var/log/redborder-ai
[ -f /usr/lib/redborder/bin/rb_rubywrapper.sh ] && /usr/lib/redborder/bin/rb_rubywrapper.sh -c

%posttrans
update-alternatives --set java $(find /usr/lib/jvm/*java-1.8.0-openjdk* -name "java"|head -n 1)

%files
%defattr(0755,root,root)
/usr/lib/redborder/bin
Expand Down

0 comments on commit 6d54112

Please sign in to comment.