forked from TEN-framework/ten-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (31 loc) · 1.02 KB
/
Copy pathDockerfile
File metadata and controls
42 lines (31 loc) · 1.02 KB
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
FROM ghcr.io/ten-framework/ten_agent_build:0.7.14 AS builder
ARG SESSION_CONTROL_CONF=session_control.conf
# Add a new argument for USE_AGENT (defaulting to 'agents/examples/default')
ARG USE_AGENT=agents/examples/voice-assistant
WORKDIR /app
COPY . .
# COPY agents/${SESSION_CONTROL_CONF} agents/session_control.conf
RUN cd ${USE_AGENT} && \
task install && task release
RUN mv ${USE_AGENT}/tenapp/.release/ agents/
FROM ubuntu:22.04
RUN apt-get clean && apt-get update && apt-get install -y --no-install-recommends \
libasound2 \
libgstreamer1.0-dev \
libunwind-dev \
libc++1 \
libssl-dev \
python3 \
python3-venv \
python3-pip \
python3-dev \
jq vim \
ca-certificates \
&& apt-get clean && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/*
WORKDIR /app
COPY --from=builder /app/agents/.release/ agents/
COPY --from=builder /app/server/bin/api /app/server/bin/api
COPY --from=builder /usr/local/lib /usr/local/lib
COPY --from=builder /usr/lib/python3 /usr/lib/python3
EXPOSE 8080
ENTRYPOINT ["/app/server/bin/api"]