serp-chat / Dockerfile
matthoffner's picture
Update Dockerfile
f10b3f0
raw
history blame
727 Bytes
FROM nvidia/cuda:11.6.0-base-ubuntu20.04
WORKDIR /app
RUN apt update && \
apt install --no-install-recommends -y build-essential python3 python3-pip wget && \
apt clean && rm -rf /var/lib/apt/lists/*
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 -r requirements.txt
EXPOSE 7860
RUN useradd -m -u 1000 user
USER user
COPY --chown=user . $HOME/app
RUN ls -al
CMD ["python", "app.py", "--host", "127.0.0.1", "--port", "7860"]