forked from shelajev/hani
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
46 lines (35 loc) · 1.25 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.5
# Install dependencies
RUN microdnf install -y \
wget \
ca-certificates \
bzip2 \
tar \
libxcb \
dbus-libs \
&& microdnf clean all
ENV PATH="/root/.local/bin:${PATH}"
# Create a directory for Goose and set PATH
WORKDIR /app
# Install Docker CLI
COPY --from=docker:dind /usr/local/bin/docker /root/.local/bin/
# Install ttyd from GitHub releases
RUN wget -O /tmp/ttyd.x86_64 https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.x86_64 && \
chmod +x /tmp/ttyd.x86_64 && \
mv /tmp/ttyd.x86_64 /usr/local/bin/ttyd
COPY config.yaml /root/.config/goose/config.yaml
# Download and install Goose
RUN wget -qO- https://github.com/block/goose/releases/download/stable/download_cli.sh | CONFIGURE=false CANARY=true bash && \
ls -la /root/.local/bin/goose && \
/root/.local/bin/goose --version
# Expose port for ttyd
EXPOSE 7681
# # Configure LLM runner as an OpenAI compatible API
ENV OPENAI_HOST=http://model-runner.docker.internal
ENV OPENAI_API_KEY=irrelevant
ENV OPENAI_BASE_PATH=/engines/llama.cpp/v1/chat/completions
ENV GOOSE_PROVIDER=openai
ENV GOOSE_MODEL=ai/qwen2.5:7B-Q4_K_M
# Set entrypoint to ttyd running goose session
ENTRYPOINT ["ttyd", "-W"]
CMD ["goose"]