Skip to content

Commit

Permalink
Update llamafile.yml: Remove "-server" suffix from filename
Browse files Browse the repository at this point in the history
From the late version of llamafile, llamafile server in integrated into generic llamafile executable binary
  • Loading branch information
rabilrbl authored Jan 11, 2024
1 parent 9e3aa87 commit d0b17fd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/llamafile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:
run: |
mkdir -p /usr/local/bin
TAG=$(curl -s "https://api.github.com/repos/Mozilla-Ocho/llamafile/tags" | grep '"name":' | sed -E 's/.*"([^"]+)".*/\1/' | head -n 1)
LLAMAFILE_SERVER_FILE_URL="https://github.com/Mozilla-Ocho/llamafile/releases/download/$TAG/llamafile-$TAG"
LLAMAFILE_FILE_URL="https://github.com/Mozilla-Ocho/llamafile/releases/download/$TAG/llamafile-$TAG"
ZIPALIGN_FILE_URL="https://github.com/Mozilla-Ocho/llamafile/releases/download/$TAG/zipalign-$TAG"
LLAMAFILE_SERVER_FILE="/usr/local/bin/llamafile-server"
LLAMAFILE_FILE="/usr/local/bin/llamafile"
ZIPALIGN_FILE="/usr/local/bin/zipalign"
wget -O "$LLAMAFILE_SERVER_FILE" "$LLAMAFILE_SERVER_FILE_URL"
wget -O "$LLAMAFILE_FILE" "$LLAMAFILE_FILE_URL"
wget -O "$ZIPALIGN_FILE" "$ZIPALIGN_FILE_URL"
chmod +x "$LLAMAFILE_SERVER_FILE"
chmod +x "$LLAMAFILE_FILE"
chmod +x "$ZIPALIGN_FILE"
mkdir -p llamafile
Expand Down Expand Up @@ -72,13 +72,13 @@ jobs:
echo "0.0.0.0" >> .args
echo "..." >> .args
- name: Prepare llama-server
- name: Prepare llamafile
run: |
# remove extension from model name
cd llamafile
file_ext_removed_model_name=$(echo ${{ steps.model_name.outputs.model }} | sed 's/\.[^.]*$//')
cp /usr/local/bin/llamafile-server "$file_ext_removed_model_name"-server.llamafile
zipalign -j0 "$file_ext_removed_model_name"-server.llamafile ${{ steps.model_name.outputs.model }} .args
cp /usr/local/bin/llamafile "$file_ext_removed_model_name".llamafile
zipalign -j0 "$file_ext_removed_model_name".llamafile ${{ steps.model_name.outputs.model }} .args
- name: Setup python
uses: actions/setup-python@v5
Expand All @@ -97,7 +97,7 @@ jobs:
cp llamafile-builder/hf.py llamafile/hf.py
cd llamafile
file_ext_removed_model_name=$(echo ${{ steps.model_name.outputs.model }} | sed 's/\.[^.]*$//')
python3 hf.py ${{ github.event.inputs.model_url }} ${{ github.event.inputs.huggingface_repo }} "$file_ext_removed_model_name"-server.llamafile
python3 hf.py ${{ github.event.inputs.model_url }} ${{ github.event.inputs.huggingface_repo }} "$file_ext_removed_model_name".llamafile
Expand Down

0 comments on commit d0b17fd

Please sign in to comment.