cazyundee commited on
Commit
ce7edba
·
verified ·
1 Parent(s): 9c40af1

Remove incompatible Docker entrypoint

Browse files
Files changed (2) hide show
  1. Dockerfile +0 -36
  2. server_entrypoint.sh +0 -28
Dockerfile DELETED
@@ -1,36 +0,0 @@
1
- FROM python:3.10-slim
2
-
3
- ENV DEBIAN_FRONTEND=noninteractive \
4
- CUDA_VISIBLE_DEVICES="" \
5
- GGML_CUDA=0 \
6
- OMP_NUM_THREADS=16 \
7
- OMP_THREAD_LIMIT=16 \
8
- HF_HOME=/data/.cache/huggingface
9
-
10
- RUN apt-get update && apt-get install -y --no-install-recommends \
11
- build-essential cmake git ca-certificates \
12
- && rm -rf /var/lib/apt/lists/*
13
-
14
- WORKDIR /opt
15
- RUN git clone --depth=1 https://github.com/ggml-org/llama.cpp.git \
16
- && cmake -S llama.cpp -B llama.cpp/build \
17
- -DGGML_NATIVE=OFF \
18
- -DGGML_OPENMP=OFF \
19
- -DGGML_CUDA=OFF \
20
- -DGGML_AVX=ON \
21
- -DGGML_AVX2=ON \
22
- -DGGML_FMA=ON \
23
- -DGGML_AVX512=OFF \
24
- -DBUILD_SHARED_LIBS=OFF \
25
- && cmake --build llama.cpp/build --config Release --target llama-server -j16 \
26
- && find llama.cpp/build -type f -name llama-server -perm -111 -exec cp {} /usr/local/bin/llama-server \; \
27
- && test -x /usr/local/bin/llama-server \
28
- && rm -rf /opt/llama.cpp
29
-
30
- RUN pip install --no-cache-dir huggingface-hub
31
-
32
- COPY server_entrypoint.sh /opt/server_entrypoint.sh
33
- RUN chmod +x /opt/server_entrypoint.sh
34
-
35
- EXPOSE 7860
36
- CMD ["/opt/server_entrypoint.sh"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
server_entrypoint.sh DELETED
@@ -1,28 +0,0 @@
1
- #!/bin/sh
2
- set -eu
3
-
4
- MODEL_DIR=/data/models/tinyllama
5
- MODEL_PATH="$MODEL_DIR/tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf"
6
- mkdir -p "$MODEL_DIR"
7
-
8
- if [ ! -f "$MODEL_PATH" ]; then
9
- echo "Downloading TinyLlama GGUF..."
10
- hf download \
11
- TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF \
12
- tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf \
13
- --repo-type model \
14
- --local-dir "$MODEL_DIR"
15
- fi
16
-
17
- # Keep this process as PID 1: no Gradio/Python subprocess wrapper.
18
- exec /usr/local/bin/llama-server \
19
- --model "$MODEL_PATH" \
20
- --host 0.0.0.0 \
21
- --port 7860 \
22
- --n-gpu-layers 0 \
23
- --threads 16 \
24
- --threads-batch 16 \
25
- --ctx-size 2048 \
26
- --parallel 1 \
27
- --no-mmap \
28
- --no-warmup