2024-07-16 16:20:57 +00:00
|
|
|
FROM intel/oneapi-basekit:2024.2.0-devel-rockylinux9 as build
|
2023-09-22 18:57:31 +00:00
|
|
|
|
2024-07-16 16:20:57 +00:00
|
|
|
RUN wget $(echo "https://pkgs.dyn.su/el9/base/x86_64/raven-release.el9.noarch.rpm" | sed "s/el9/el$(rpm -q --queryformat '%{RELEASE}' rpm | grep -oP 'el\K[0-9]+')/g") && \
|
|
|
|
rpm -ivh raven-release*.rpm && \
|
|
|
|
rm -rf raven-release*.rpm && \
|
|
|
|
dnf update -y && \
|
2024-07-16 17:12:01 +00:00
|
|
|
dnf -y --enablerepo=raven-extras install golang && \
|
|
|
|
dnf -y install epel-release && \
|
|
|
|
dnf -y update && \
|
|
|
|
dnf -y install supervisor
|
2023-09-08 20:41:49 +00:00
|
|
|
|
2024-07-01 11:14:31 +00:00
|
|
|
WORKDIR /app
|
2024-01-21 19:37:11 +00:00
|
|
|
|
2024-07-07 16:19:35 +00:00
|
|
|
ARG GIN_MODE=release
|
|
|
|
|
2024-07-16 16:20:57 +00:00
|
|
|
ADD . .
|
2024-01-21 19:37:11 +00:00
|
|
|
|
2024-07-16 17:12:01 +00:00
|
|
|
RUN OLLAMA_CUSTOM_CPU_DEFS="-DGGML_BLAS=ON -DGGML_BLAS_VENDOR=Intel10_64lp -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DGGML_NATIVE=ON" go generate ./... && \
|
2024-07-01 11:14:31 +00:00
|
|
|
go build -ldflags="-s -w"
|
2024-01-21 19:37:11 +00:00
|
|
|
|
2024-07-01 11:14:31 +00:00
|
|
|
ENV MODEL_NAME="llama"
|
|
|
|
ENV OLLAMA_HOST="0.0.0.0:8080"
|
2024-03-14 17:24:13 +00:00
|
|
|
|
2024-07-01 11:14:31 +00:00
|
|
|
EXPOSE 8080
|
2023-09-06 21:14:20 +00:00
|
|
|
|
2024-07-16 17:12:01 +00:00
|
|
|
CMD ["supervisord", "-c", "/app/supervisord.conf"]
|