File size: 777 Bytes
27a727f
4bebab5
27a727f
 
 
33669f9
4bebab5
2984d75
4bebab5
4900a40
 
 
 
 
 
 
2a87d1e
 
 
 
 
 
 
 
4bebab5
2a87d1e
f03a4f2
4bebab5
 
649486f
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
FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu20.04

ARG DEBIAN_FRONTEND=noninteractive

RUN apt update
RUN apt install -y git python python3 python3-pip wget

EXPOSE 7860

RUN export PATH="/usr/local/cuda/bin:$PATH"
RUN wget -qO- "https://cmake.org/files/v3.17/cmake-3.17.0-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local
RUN CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 pip install llama-cpp-python --no-cache-dir
COPY requirements.txt ./
RUN pip install --upgrade pip && \
    pip install --no-cache-dir --upgrade -r requirements.txt

RUN useradd -m -u 1000 user

USER user

ENV HOME=/home/user \
	PATH=/home/user/.local/bin:$PATH

WORKDIR $HOME/app

COPY --chown=user . $HOME/app

RUN ls -al

CMD ["python", "app.py", "--host", "127.0.0.1", "--port", "7860"]