Skip to content

Commit

Permalink
oneapi image(ubuntu 22.04) works well with ARC770 GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
zhewang1-intc committed Apr 11, 2024
1 parent aaf0a67 commit e8aa4a5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ARG AMDGPU_TARGETS
RUN OLLAMA_SKIP_CPU_GENERATE=1 sh gen_linux.sh
RUN mkdir /tmp/scratch && \
for dep in $(cat /go/src/github.com/ollama/ollama/llm/llama.cpp/build/linux/x86_64/rocm*/lib/deps.txt) ; do \
cp ${dep} /tmp/scratch/ || exit 1 ; \
cp ${dep} /tmp/scratch/ || exit 1 ; \
done && \
(cd /opt/rocm/lib && tar cf - rocblas/library) | (cd /tmp/scratch/ && tar xf - ) && \
mkdir -p /go/src/github.com/ollama/ollama/dist/deps/ && \
Expand Down Expand Up @@ -143,7 +143,11 @@ ENTRYPOINT ["/bin/ollama"]
CMD ["serve"]

# oneAPI images are much larger so we keep it distinct from the CPU/CUDA image
FROM --platform=linux/amd64 intel/oneapi-basekit:2024.0.1-devel-rockylinux9 as runtime-oneapi
# use ubuntu oneapi-basekit image as runtime image, need to use --device param to mount GPU to container.
# e.g. docker run -it -v "$(pwd):/app:Z" --device /dev/dri/renderD128:/dev/dri/renderD129 --device /dev/dri/card1:/dev/dri/card1 IMAGE_ID
# host machine need to install Intel GPU driver correctly.
# to detect the device info which you want to mount, run sudo intel_gpu_top -L
FROM --platform=linux/amd64 intel/oneapi-basekit:2024.0.1-devel-ubuntu22.04 as runtime-oneapi
RUN update-pciids
COPY --from=build-amd64 /go/src/github.com/ollama/ollama/ollama /bin/ollama
EXPOSE 11434
Expand Down

0 comments on commit e8aa4a5

Please sign in to comment.