2023-04-10 03:51:48 -04:00
|
|
|
FROM alpine AS build
|
|
|
|
|
2023-07-29 10:44:56 -04:00
|
|
|
RUN apk add --update alpine-sdk boost-dev cmake asio-dev
|
2023-04-10 03:51:48 -04:00
|
|
|
|
2023-07-29 10:42:15 -04:00
|
|
|
ADD ./ /turbopilot/
|
2023-04-10 03:51:48 -04:00
|
|
|
|
2023-07-29 10:42:15 -04:00
|
|
|
RUN mkdir /turbopilot/build
|
2023-04-10 03:51:48 -04:00
|
|
|
|
2023-07-29 10:42:15 -04:00
|
|
|
WORKDIR /turbopilot/build
|
2023-04-10 03:51:48 -04:00
|
|
|
|
2023-05-08 05:26:42 -04:00
|
|
|
RUN cmake -D GGML_STATIC=ON ..
|
2023-07-29 10:42:15 -04:00
|
|
|
RUN make turbopilot
|
2023-04-10 03:51:48 -04:00
|
|
|
|
|
|
|
FROM alpine AS runtime
|
|
|
|
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
2023-07-29 10:42:15 -04:00
|
|
|
COPY --from=build /turbopilot/build/turbopilot /app/turbopilot
|
2023-04-10 03:51:48 -04:00
|
|
|
|
|
|
|
ENV THREADS=4
|
|
|
|
|
2023-04-10 04:18:04 -04:00
|
|
|
ENV MODEL="/models/codegen-2B-multi-ggml-4bit-quant.bin"
|
2023-04-10 03:51:48 -04:00
|
|
|
|
2023-05-08 09:24:49 -04:00
|
|
|
ENV BATCHSIZE=8
|
|
|
|
|
2023-04-10 03:51:48 -04:00
|
|
|
COPY ./run.sh /app/
|
|
|
|
|
|
|
|
EXPOSE 18080
|
|
|
|
|
|
|
|
CMD /app/run.sh
|