Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 8d01926

Browse files
authored
Deprecate nitro.zip (#220)
Co-authored-by: Hien To <[email protected]>
1 parent f14655b commit 8d01926

File tree

6 files changed

+28
-93
lines changed

6 files changed

+28
-93
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,11 @@ jobs:
7373
run: |
7474
mkdir -p nitro
7575
cp build/nitro nitro/
76-
zip -r nitro.zip nitro
7776
tar -czvf nitro.tar.gz nitro
7877
# run e2e testing
7978
cd nitro
8079
chmod +x ../.github/scripts/e2e-test-linux-and-mac.sh && ../.github/scripts/e2e-test-linux-and-mac.sh ./nitro ${{ env.MODEL_URL }}
8180
82-
- uses: actions/[email protected]
83-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
84-
env:
85-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86-
with:
87-
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
88-
asset_path: ./nitro.zip
89-
asset_name: nitro-${{ needs.create-draft-release.outputs.version }}-linux-amd64.zip
90-
asset_content_type: application/zip
91-
9281
- uses: actions/[email protected]
9382
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
9483
env:
@@ -132,22 +121,11 @@ jobs:
132121
run: |
133122
mkdir -p nitro
134123
cp build/nitro nitro/
135-
zip -r nitro.zip nitro
136124
tar -czvf nitro.tar.gz nitro
137125
# run e2e testing
138126
cd nitro
139127
chmod +x ../.github/scripts/e2e-test-linux-and-mac.sh && ../.github/scripts/e2e-test-linux-and-mac.sh ./nitro ${{ env.MODEL_URL }}
140128
141-
- uses: actions/[email protected]
142-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
143-
env:
144-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
145-
with:
146-
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
147-
asset_path: ./nitro.zip
148-
asset_name: nitro-${{ needs.create-draft-release.outputs.version }}-linux-amd64-cuda.zip
149-
asset_content_type: application/zip
150-
151129
- uses: actions/[email protected]
152130
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
153131
env:
@@ -193,22 +171,11 @@ jobs:
193171
mkdir -p nitro
194172
cp llama.cpp/ggml-metal.metal nitro/
195173
cp build/nitro nitro/
196-
zip -r nitro.zip nitro
197174
tar -czvf nitro.tar.gz nitro
198175
# run e2e testing
199176
cd nitro
200177
chmod +x ../.github/scripts/e2e-test-linux-and-mac.sh && ../.github/scripts/e2e-test-linux-and-mac.sh ./nitro ${{ env.MODEL_URL }}
201178
202-
- uses: actions/[email protected]
203-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
204-
env:
205-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
206-
with:
207-
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
208-
asset_path: ./nitro.zip
209-
asset_name: nitro-${{ needs.create-draft-release.outputs.version }}-mac-arm64.zip
210-
asset_content_type: application/zip
211-
212179
- uses: actions/[email protected]
213180
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
214181
env:
@@ -252,21 +219,11 @@ jobs:
252219
run: |
253220
mkdir -p nitro
254221
cp build/nitro nitro/
255-
zip -r nitro.zip nitro
256222
tar -czvf nitro.tar.gz nitro
257223
# run e2e testing
258224
cd nitro
259225
chmod +x ../.github/scripts/e2e-test-linux-and-mac.sh && ../.github/scripts/e2e-test-linux-and-mac.sh ./nitro ${{ env.MODEL_URL }}
260226
261-
- uses: actions/[email protected]
262-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
263-
env:
264-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
265-
with:
266-
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
267-
asset_path: ./nitro.zip
268-
asset_name: nitro-${{ needs.create-draft-release.outputs.version }}-mac-amd64.zip
269-
asset_content_type: application/zip
270227
- uses: actions/[email protected]
271228
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
272229
env:
@@ -332,23 +289,11 @@ jobs:
332289
run: |
333290
robocopy build_deps\_install\bin .\build\Release zlib.dll
334291
robocopy build\bin\Release .\build\Release llama.dll
335-
7z a nitro.zip .\build\Release\*
336292
7z a -ttar temp.tar .\build\Release\*
337293
7z a -tgzip nitro.tar.gz temp.tar
338294
cd .\build\Release
339295
..\..\.github\scripts\e2e-test-windows.bat .\nitro.exe ${{ env.MODEL_URL }}
340296
341-
- uses: actions/[email protected]
342-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
343-
env:
344-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
345-
with:
346-
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
347-
asset_path: ./nitro.zip
348-
asset_name: nitro-${{ needs.create-draft-release.outputs.version }}-win-amd64.zip
349-
asset_content_type: application/zip
350-
351-
352297
- uses: actions/[email protected]
353298
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
354299
env:
@@ -404,21 +349,11 @@ jobs:
404349
set PATH=%PATH%;C:\Program Files\7-Zip\
405350
robocopy build_deps\_install\bin .\build\Release zlib.dll
406351
robocopy build\bin\Release .\build\Release llama.dll
407-
7z a nitro.zip .\build\Release\*
408352
7z a -ttar temp.tar .\build\Release\*
409353
7z a -tgzip nitro.tar.gz temp.tar
410354
cd .\build\Release
411355
..\..\.github\scripts\e2e-test-windows.bat .\nitro.exe ${{ env.MODEL_URL }}
412-
413-
- uses: actions/[email protected]
414-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
415-
env:
416-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
417-
with:
418-
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
419-
asset_path: ./nitro.zip
420-
asset_name: nitro-${{ needs.create-draft-release.outputs.version }}-win-amd64-cuda.zip
421-
asset_content_type: application/zip
356+
422357
- uses: actions/[email protected]
423358
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
424359
env:

docs/src/containers/DownloadButton/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ const systemsTemplate = [
88
{
99
name: "Download for Mac",
1010
logo: require("@site/static/img/logos/apple-logo-white.png").default,
11-
fileFormat: "{appname}-mac-arm64.zip",
11+
fileFormat: "{appname}-mac-arm64.tar.gz",
1212
},
1313
{
1414
name: "Download for Windows",
1515
logo: require("@site/static/img/logos/windows-logo-white.png").default,
16-
fileFormat: "{appname}-win-amd64.zip",
16+
fileFormat: "{appname}-win-amd64.tar.gz",
1717
},
1818
{
1919
name: "Download for Linux",
2020
logo: require("@site/static/img/logos/linux-logo-white.png").default,
21-
fileFormat: "{appname}-linux-amd64.zip",
21+
fileFormat: "{appname}-linux-amd64.tar.gz",
2222
},
2323
];
2424

docs/src/containers/Homepage/GetNitro/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default function GetNitro() {
1515
? `powershell -Command "& { Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/janhq/nitro/main/install.bat' -OutFile 'install.bat'; .\install.bat; Remove-Item -Path 'install.bat' }"`
1616
: `curl -sfL https://raw.githubusercontent.com/janhq/nitro/main/install.sh | sudo /bin/bash -`;
1717

18-
const codeStringNpm = `#(Coming Soon)\nnpm install @janhq/nitro`;
18+
const codeStringNpm = `npm install @janhq/nitro`;
1919
const codeStringPython = `#(Coming Soon)\npip install @janhq/nitro`;
2020

2121
const [packageInstall, setPackageInstall] = useState("Shell script");

examples/example-docker/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ WORKDIR /app
66

77
# Install curl, unzip, and numactl, download the file, unzip it, then remove unnecessary packages
88
RUN apt-get update && \
9-
apt-get install -y curl unzip numactl && \
10-
curl -L "https://github.com/janhq/nitro/releases/download/v0.1.14/nitro-0.1.14-linux-amd64.zip" -o nitro.zip && \
11-
unzip nitro.zip && \
12-
rm nitro.zip && \
13-
apt-get remove --purge -y curl unzip && \
9+
apt-get install -y curl tar gzip numactl && \
10+
curl -L "https://github.com/janhq/nitro/releases/download/v0.1.17/nitro-0.1.17-linux-amd64.tar.gz" -o nitro.tar.gz && \
11+
tar -xzvf nitro.tar.gz && \
12+
rm nitro.tar.gz && \
13+
apt-get remove --purge -y curl tar gzip && \
1414
apt-get autoremove -y && \
1515
apt-get clean && \
1616
rm -rf /var/lib/apt/lists/*

install.bat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ if "%GPU%"=="true" (
4242
:: If --gpu option is provided, append -cuda to the URL
4343
set "URL=%URL%-cuda"
4444
)
45-
set "URL=%URL%.zip"
45+
set "URL=%URL%.tar.gz"
4646

4747
:: Download and extract nitro
4848
echo Downloading Nitro from: %URL%
49-
powershell -Command "Invoke-WebRequest -OutFile '%TEMP%\nitro.zip' '%URL%'"
49+
powershell -Command "Invoke-WebRequest -OutFile '%TEMP%\nitro.tar.gz' '%URL%'"
5050
echo Extracting Nitro...
51-
powershell -Command "Expand-Archive -Path '%TEMP%\nitro.zip' -DestinationPath '%APPDATA%\nitro'"
51+
powershell -Command "Expand-Archive -Path '%TEMP%\nitro.tar.gz' -DestinationPath '%APPDATA%\nitro'"
5252

5353
:: Add nitro to the PATH
5454
setx PATH "%APPDATA%\nitro;%PATH%"
@@ -59,6 +59,6 @@ echo setx PATH "%PATH:;%APPDATA%\nitro=;%"" >> "%APPDATA%\nitro\uninstallnitro.b
5959
echo rmdir /S /Q "%APPDATA%\nitro" >> "%APPDATA%\nitro\uninstallnitro.bat"
6060

6161
:: Clean up
62-
del %TEMP%\nitro.zip
62+
del %TEMP%\nitro.tar.gz
6363

6464
endlocal

install.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ if [ "$(id -u)" != "0" ]; then
66
exit 1
77
fi
88

9-
# Check and suggest installing jq and unzip if not present
10-
check_install_jq_unzip() {
9+
# Check and suggest installing jq and tar if not present
10+
check_install_jq_tar() {
1111
RED='\033[0;31m'
1212
GREEN='\033[0;32m'
1313
NC='\033[0m' # No Color
@@ -25,15 +25,15 @@ check_install_jq_unzip() {
2525
fi
2626
fi
2727

28-
if ! command -v unzip &> /dev/null; then
29-
echo -e "${RED}unzip could not be found ...${NC}"
28+
if ! command -v tar &> /dev/null; then
29+
echo -e "${RED}tar could not be found ...${NC}"
3030
if [[ "$OS" == "Linux" ]]; then
31-
echo -e "${GREEN}Please run the command below to install unzip then rerun this script${NC}"
32-
echo "$ sudo apt-get install unzip"
31+
echo -e "${GREEN}Please run the command below to install tar then rerun this script${NC}"
32+
echo "$ sudo apt install tar gzip"
3333
exit 1
3434
elif [[ "$OS" == "Darwin" ]]; then
35-
echo -e "${GREEN}Please run the command below to install unzip then rerun this script${NC}"
36-
echo "$ brew install unzip"
35+
echo -e "${GREEN}Please run the command below to install tar then rerun this script${NC}"
36+
echo "$ brew install gnu-tar"
3737
exit 1
3838
fi
3939
fi
@@ -42,10 +42,10 @@ check_install_jq_unzip() {
4242
# Function to download and install nitro
4343
install_nitro() {
4444
rm -rf /tmp/nitro
45-
rm /tmp/nitro.zip
45+
rm /tmp/nitro.tar.gz
4646
echo "Downloading Nitro version $VERSION... from $1"
47-
curl -sL "$1" -o /tmp/nitro.zip
48-
unzip /tmp/nitro.zip -d /tmp
47+
curl -sL "$1" -o /tmp/nitro.tar.gz
48+
tar -xzvf /tmp/nitro.tar.gz -C /tmp
4949
ls /tmp/nitro
5050

5151
# Copying files to /usr/local/bin
@@ -77,7 +77,7 @@ ARCH=$(uname -m)
7777
VERSION="latest"
7878
GPU=""
7979

80-
check_install_jq_unzip
80+
check_install_jq_tar
8181

8282
# Parse arguments
8383
for arg in "$@"
@@ -116,11 +116,11 @@ fi
116116
# Construct download URL based on OS, ARCH, GPU and VERSION
117117
case $OS in
118118
Linux)
119-
FILE_NAME="nitro-${VERSION}-linux-amd64${GPU}.zip"
119+
FILE_NAME="nitro-${VERSION}-linux-amd64${GPU}.tar.gz"
120120
;;
121121
Darwin)
122122
ARCH_FORMAT=$( [[ "$ARCH" == "arm64" ]] && echo "mac-arm64" || echo "mac-amd64")
123-
FILE_NAME="nitro-${VERSION}-${ARCH_FORMAT}.zip"
123+
FILE_NAME="nitro-${VERSION}-${ARCH_FORMAT}.tar.gz"
124124
;;
125125
*)
126126
echo "Unsupported OS."

0 commit comments

Comments
 (0)