# docker container with aicirt and CPU-only rllm (llama.cpp)
# TAG: aici/rllm-llamacpp

FROM bitnami/minideb:bookworm

RUN apt-get update && apt-get install -y libssl3 && apt-get clean

# install aicirt and rllm
COPY target/dist/aicirt/aicirt /usr/bin/aicirt
COPY target/dist/rllm-llamacpp/rllm-llamacpp /usr/bin/rllm-llamacpp

RUN mkdir /workspace

# copy the controllers
WORKDIR /workspace

# RUN mkdir wasm
# COPY target/dist/aici_*.wasm wasm/
# # "upload" and tag the controllers
# RUN aicirt --module wasm/aici_guidance_ctrl.wasm --tag guidance
# RUN aicirt --module wasm/aici_pyctrl.wasm --tag pyctrl --gh-module gh:microsoft/aici/pyctrl
# RUN aicirt --module wasm/aici_jsctrl.wasm --tag jsctrl --gh-module gh:microsoft/aici/jsctrl

ENV RUST_LOG info,tokenizers=error

ENTRYPOINT ["rllm-llamacpp", "--aicirt=/usr/bin/aicirt"]
