baalajimaestro
87345eda1b
Running the binary outside the build environment crashes with signal 127 and i am unable to debug why Signed-off-by: baalajimaestro <me@baalajimaestro.me>
26 lines
838 B
Docker
26 lines
838 B
Docker
FROM intel/oneapi-basekit:2024.2.0-devel-rockylinux9 as build
|
|
|
|
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 && \
|
|
dnf -y --enablerepo=raven-extras install golang && \
|
|
dnf -y install epel-release && \
|
|
dnf -y update && \
|
|
dnf -y install supervisor
|
|
|
|
WORKDIR /app
|
|
|
|
ARG GIN_MODE=release
|
|
|
|
ADD . .
|
|
|
|
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 ./... && \
|
|
go build -ldflags="-s -w"
|
|
|
|
ENV MODEL_NAME="llama"
|
|
ENV OLLAMA_HOST="0.0.0.0:8080"
|
|
|
|
EXPOSE 8080
|
|
|
|
CMD ["supervisord", "-c", "/app/supervisord.conf"]
|