llama-cpp-python-djs-bot/gpu-server/Dockerfile

19 lines
535 B
Docker
Raw Normal View History

2023-05-19 15:32:21 -04:00
FROM nvidia/cuda:12.1.1-devel-ubuntu20.04
# Install the deps
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/GMT
2023-05-31 17:02:07 -04:00
RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-pip git cmake build-essential
2023-05-19 15:32:21 -04:00
# Get llama-cpp-python
WORKDIR /usr/src
WORKDIR /usr/src/app
# Build llama-cpp-python w/CuBLAS
2023-05-31 17:02:07 -04:00
RUN CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 pip install llama-cpp-python[server]
2023-05-19 15:32:21 -04:00
# We need to set the host to 0.0.0.0 to allow outside access
ENV HOST 0.0.0.0
# Run the server
2023-05-31 17:02:07 -04:00
CMD python3 -m llama_cpp.server