File size: 914 Bytes
01a9f90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5df3b0b
01a9f90
5df3b0b
01a9f90
 
 
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
37
38
39
40
41
FROM python:3.10

RUN apt-get update && \
    apt-get install -y \
    build-essential \
    libssl-dev \
    libffi-dev \
    libbz2-dev \
    liblzma-dev \
    zlib1g-dev \
    libsqlite3-dev \
    wget \
    curl \
    git \
    cmake \
    libblis64-4 \
    libblis64-4-openmp \
    libblis64-4-pthread \
    libblis64-4-serial \
    libblis64-dev \
    libblis64-openmp-dev \
    libblis64-pthread-dev \
    libblis64-serial-dev && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
ENV GOMP_CPU_AFFINITY="0-19"
ENV BLIS_NUM_THREADS=14

WORKDIR /app

RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir --upgrade gradio
RUN CMAKE_ARGS="-DGGML_BLAS=ON -DGGML_BLAS_VENDOR=FLAME" \
    pip install --no-cache-dir --upgrade llama-cpp-python

COPY --chown=user ./app.py /app/app.py
CMD ["python", "app.py"]