|
ARG UBUNTU_VERSION=22.04 |
|
|
|
|
|
ARG ROCM_VERSION=5.6 |
|
|
|
|
|
ARG BASE_ROCM_DEV_CONTAINER=rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-complete |
|
|
|
FROM ${BASE_ROCM_DEV_CONTAINER} AS build |
|
|
|
|
|
|
|
|
|
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 . . |
|
|
|
|
|
ENV AMDGPU_TARGETS=${ROCM_DOCKER_ARCH} |
|
|
|
ENV GGML_HIPBLAS=1 |
|
ENV CC=/opt/rocm/llvm/bin/clang |
|
ENV CXX=/opt/rocm/llvm/bin/clang++ |
|
|
|
ENV LLAMA_ARG_HOST=0.0.0.0 |
|
|
|
|
|
ENV LLAMA_CURL=1 |
|
RUN apt-get update && \ |
|
apt-get install -y libcurl4-openssl-dev curl |
|
|
|
RUN make -j$(nproc) llama-server |
|
|
|
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ] |
|
|
|
ENTRYPOINT [ "/app/llama-server" ] |
|
|