mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-30 21:34:36 +00:00
39baaf55a1
* feat: add Dockerfiles for each platform that user ./server instead of ./main * feat: update .github/workflows/docker.yml to build server-first docker containers * doc: add information about running the server with Docker to README.md * doc: add information about running with docker to the server README * doc: update n-gpu-layers to show correct GPU usage * fix(doc): update container tag from `server` to `server-cuda` for README example on running server container with CUDA
46 lines
1010 B
Docker
46 lines
1010 B
Docker
ARG UBUNTU_VERSION=22.04
|
|
|
|
# This needs to generally match the container host's environment.
|
|
ARG ROCM_VERSION=5.6
|
|
|
|
# Target the CUDA build image
|
|
ARG BASE_ROCM_DEV_CONTAINER=rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-complete
|
|
|
|
FROM ${BASE_ROCM_DEV_CONTAINER} as build
|
|
|
|
# Unless otherwise specified, we make a fat build.
|
|
# List from https://github.com/ggerganov/llama.cpp/pull/1087#issuecomment-1682807878
|
|
# This is mostly tied to rocBLAS supported archs.
|
|
ARG ROCM_DOCKER_ARCH=\
|
|
gfx803 \
|
|
gfx900 \
|
|
gfx906 \
|
|
gfx908 \
|
|
gfx90a \
|
|
gfx1010 \
|
|
gfx1030 \
|
|
gfx1100 \
|
|
gfx1101 \
|
|
gfx1102
|
|
|
|
COPY requirements.txt requirements.txt
|
|
COPY requirements requirements
|
|
|
|
RUN pip install --upgrade pip setuptools wheel \
|
|
&& pip install -r requirements.txt
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
# Set nvcc architecture
|
|
ENV GPU_TARGETS=${ROCM_DOCKER_ARCH}
|
|
# Enable ROCm
|
|
ENV LLAMA_HIPBLAS=1
|
|
ENV CC=/opt/rocm/llvm/bin/clang
|
|
ENV CXX=/opt/rocm/llvm/bin/clang++
|
|
|
|
RUN make
|
|
|
|
ENTRYPOINT [ "/app/server" ]
|