File size: 849 Bytes
a80b32c
106db30
 
 
 
 
 
 
 
 
 
a80b32c
770ee4c
a80b32c
 
106db30
 
 
892047e
106db30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c968716
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM ghcr.io/ggerganov/llama.cpp:full-cuda

# Install build and runtime dependencies
RUN apt-get update && \
    apt-get install -y \
    libopenblas-dev \
    ninja-build \
    build-essential \
    pkg-config \
    curl

RUN make LLAMA_CUBLAS=1

RUN pip install -U pip setuptools wheel && \
  pip install --verbose llama-cpp-python[server]

# Download model
RUN mkdir model && \
    curl -L https://huggingface.co/matthoffner/Magicoder-S-DS-6.7B-GGUF/resolve/main/Magicoder-S-DS-6.7B_Q4_K_M.gguf -o model/gguf-model.gguf

COPY ./start_server.sh ./
COPY ./main.py ./
COPY ./index.html ./

# Make the server start script executable
RUN chmod +x ./start_server.sh

# Set environment variable for the host
ENV HOST=0.0.0.0
ENV PORT=7860

# Expose a port for the server
EXPOSE ${PORT}

# Run the server start script
CMD ["/bin/sh", "./start_server.sh"]