File size: 674 Bytes
77514f9
 
 
 
 
 
 
 
 
 
1d65060
 
98b82e8
094da1d
e64ee9d
094da1d
e7cd513
77514f9
98b82e8
77514f9
 
98b82e8
 
77514f9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
    python3 python3-pip curl ca-certificates \
    && rm -rf /var/lib/apt/lists/*

RUN curl -L https://github.com/ggml-org/llama.cpp/releases/download/b8468/llama-b8468-bin-ubuntu-x64.tar.gz \
    -o /tmp/llama.tar.gz \
    && mkdir -p /opt/llama \
    && tar xzf /tmp/llama.tar.gz -C /opt/llama \
    && rm /tmp/llama.tar.gz

RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user PATH="/home/user/.local/bin:$PATH"
WORKDIR /home/user/app

RUN pip3 install --no-cache-dir --user huggingface_hub

COPY --chown=user start.sh .
RUN chmod +x start.sh

EXPOSE 7860
CMD ["bash", "start.sh"]