mzwing commited on
Commit
07876fd
·
verified ·
1 Parent(s): 6f16e21
Dockerfile CHANGED
@@ -3,6 +3,13 @@ FROM intel/oneapi-runtime:latest
3
  RUN apt-get update && apt-get install -y --no-install-recommends \
4
  aria2 \
5
  unzip \
 
 
 
 
 
 
 
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
  RUN useradd -m -u 1000 user
@@ -13,16 +20,19 @@ ENV HOME=/home/user
13
 
14
  WORKDIR $HOME/app
15
 
16
- ARG LLAMA_CPP_VERSION
17
 
18
- RUN aria2c -c -x16 https://github.com/MZWNET/actions/releases/download/llama_cpp-$LLAMA_CPP_VERSION/llama-$LLAMA_CPP_VERSION-bin-linux-avx2-intel-mkl-x64.zip \
19
- && unzip llama-$LLAMA_CPP_VERSION-bin-linux-avx2-intel-mkl-x64.zip -d llama.cpp \
20
- && mv llama.cpp/server . \
21
- && chmod +x ./server \
22
- && rm -rf llama-$LLAMA_CPP_VERSION-bin-linux-avx2-intel-mkl-x64.zip llama.cpp
23
 
24
  RUN aria2c -c -x16 https://huggingface.co/mzwing/AquilaChat2-7B-16K-GGUF/resolve/main/AquilaChat2-7B-16K.Q3_K_L.gguf?download=true -o AquilaChat2-7B-16K.Q3_K_L.gguf
25
 
 
 
 
 
26
  COPY --chown=user start.sh .
27
 
28
  RUN chmod +x start.sh
 
3
  RUN apt-get update && apt-get install -y --no-install-recommends \
4
  aria2 \
5
  unzip \
6
+ debian-keyring \
7
+ debian-archive-keyring \
8
+ apt-transport-https \
9
+ curl \
10
+ && curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg \
11
+ && curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list \
12
+ && apt update && apt install -y --no-install-recommends caddy \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
  RUN useradd -m -u 1000 user
 
20
 
21
  WORKDIR $HOME/app
22
 
23
+ ARG NITRO_VERSION
24
 
25
+ RUN aria2c -c -x16 https://github.com/MZWNET/actions/releases/download/nitro-v$NITRO_VERSION/nitro-$NITRO_VERSION-linux-amd64-intel-mkl-avx2.zip \
26
+ && unzip nitro-$NITRO_VERSION-linux-amd64-intel-mkl-avx2.zip -d . \
27
+ && chmod +x ./nitro \
28
+ && rm -rf nitro-$NITRO_VERSION-linux-amd64-intel-mkl-avx2.zip
 
29
 
30
  RUN aria2c -c -x16 https://huggingface.co/mzwing/AquilaChat2-7B-16K-GGUF/resolve/main/AquilaChat2-7B-16K.Q3_K_L.gguf?download=true -o AquilaChat2-7B-16K.Q3_K_L.gguf
31
 
32
+ COPY --chown=user Caddyfile .
33
+
34
+ RUN caddy validate ./Caddyfile
35
+
36
  COPY --chown=user start.sh .
37
 
38
  RUN chmod +x start.sh
Dockerfile.nitro → Dockerfile.llamacpp RENAMED
@@ -1,15 +1,8 @@
1
- FROM intel/oneapi-basekit:latest
2
 
3
  RUN apt-get update && apt-get install -y --no-install-recommends \
4
  aria2 \
5
  unzip \
6
- debian-keyring \
7
- debian-archive-keyring \
8
- apt-transport-https \
9
- curl \
10
- && curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg \
11
- && curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list \
12
- && apt update && apt install -y --no-install-recommends caddy \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
  RUN useradd -m -u 1000 user
@@ -20,19 +13,16 @@ ENV HOME=/home/user
20
 
21
  WORKDIR $HOME/app
22
 
23
- ARG NITRO_VERSION
24
 
25
- RUN aria2c -c -x16 https://github.com/MZWNET/actions/releases/download/nitro-v$NITRO_VERSION/nitro-$NITRO_VERSION-linux-amd64-intel-mkl-avx2.zip \
26
- && unzip nitro-$NITRO_VERSION-linux-amd64-intel-mkl-avx2.zip -d . \
27
- && chmod +x ./nitro \
28
- && rm -rf nitro-$NITRO_VERSION-linux-amd64-intel-mkl-avx2.zip
 
29
 
30
  RUN aria2c -c -x16 https://huggingface.co/mzwing/AquilaChat2-7B-16K-GGUF/resolve/main/AquilaChat2-7B-16K.Q3_K_L.gguf?download=true -o AquilaChat2-7B-16K.Q3_K_L.gguf
31
 
32
- COPY --chown=user Caddyfile .
33
-
34
- RUN caddy validate ./Caddyfile
35
-
36
  COPY --chown=user start.sh .
37
 
38
  RUN chmod +x start.sh
 
1
+ FROM intel/oneapi-runtime:latest
2
 
3
  RUN apt-get update && apt-get install -y --no-install-recommends \
4
  aria2 \
5
  unzip \
 
 
 
 
 
 
 
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
  RUN useradd -m -u 1000 user
 
13
 
14
  WORKDIR $HOME/app
15
 
16
+ ARG LLAMA_CPP_VERSION
17
 
18
+ RUN aria2c -c -x16 https://github.com/MZWNET/actions/releases/download/llama_cpp-$LLAMA_CPP_VERSION/llama-$LLAMA_CPP_VERSION-bin-linux-avx2-intel-mkl-x64.zip \
19
+ && unzip llama-$LLAMA_CPP_VERSION-bin-linux-avx2-intel-mkl-x64.zip -d llama.cpp \
20
+ && mv llama.cpp/server . \
21
+ && chmod +x ./server \
22
+ && rm -rf llama-$LLAMA_CPP_VERSION-bin-linux-avx2-intel-mkl-x64.zip llama.cpp
23
 
24
  RUN aria2c -c -x16 https://huggingface.co/mzwing/AquilaChat2-7B-16K-GGUF/resolve/main/AquilaChat2-7B-16K.Q3_K_L.gguf?download=true -o AquilaChat2-7B-16K.Q3_K_L.gguf
25
 
 
 
 
 
26
  COPY --chown=user start.sh .
27
 
28
  RUN chmod +x start.sh
start.llamacpp.sh ADDED
@@ -0,0 +1 @@
 
 
1
+ ./server -m ./AquilaChat2-7B-16K.Q3_K_L.gguf -t $(nproc) -c 16384 -a AquilaChat2-7B-16K --port 8080 --host 0.0.0.0
start.nitro.sh DELETED
@@ -1,8 +0,0 @@
1
- caddy run &
2
- sleep 10 && curl -s http://127.0.0.1:3928/inferences/llamacpp/loadmodel \
3
- -H 'Content-Type: application/json' \
4
- -d '{
5
- "llama_model_path": "./AquilaChat2-7B-16K.Q3_K_L.gguf",
6
- "ctx_len": 16384,
7
- }' &
8
- ./nitro
 
 
 
 
 
 
 
 
 
start.sh CHANGED
@@ -1 +1,8 @@
1
- ./server -m ./AquilaChat2-7B-16K.Q3_K_L.gguf -t $(nproc) -c 16384 -a AquilaChat2-7B-16K --port 8080 --host 0.0.0.0
 
 
 
 
 
 
 
 
1
+ caddy run &
2
+ sleep 10 && curl -s http://127.0.0.1:3928/inferences/llamacpp/loadmodel \
3
+ -H 'Content-Type: application/json' \
4
+ -d '{
5
+ "llama_model_path": "./AquilaChat2-7B-16K.Q3_K_L.gguf",
6
+ "ctx_len": 16384,
7
+ }' &
8
+ ./nitro