Expose OpenAI API compatibility using aichat
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
FROM rust:latest
|
||||
|
||||
RUN rustup target add x86_64-unknown-linux-musl
|
||||
RUN apt update && apt install -y musl-tools musl-dev
|
||||
RUN apt update && apt install -y musl-tools musl-dev curl
|
||||
RUN update-ca-certificates
|
||||
|
||||
RUN cargo install --target x86_64-unknown-linux-musl aichat
|
||||
|
||||
ADD src/aichat/entrypoint.sh /entrypoint.sh
|
||||
ADD src/aichat/config.yaml /aichat_config_tpl.yaml
|
||||
|
||||
RUN chmod 755 entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
4
src/aichat/entrypoint.sh
Normal file
4
src/aichat/entrypoint.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
mkdir -p ~/.config/aichat
|
||||
cat /aichat_config_tpl.yaml | sed "s/__LLM_API_KEY__/${LLM_API_KEY}/" | sed "s/localhost/ollama/" >~/.config/aichat/config.yaml
|
||||
aichat --serve 0.0.0.0
|
||||
Reference in New Issue
Block a user