forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (18 loc) · 761 Bytes
/
Copy pathDockerfile
File metadata and controls
25 lines (18 loc) · 761 Bytes
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
FROM gcr.io/based-hardware-dev/python:3.11-slim-forky AS builder
ENV PATH="/opt/venv/bin:$PATH"
RUN python -m venv /opt/venv
COPY plugins/requirements.txt /tmp/requirements.txt
COPY plugins/omi-plugin-sdk /app/omi-plugin-sdk
WORKDIR /app
RUN pip install --no-cache-dir -r /tmp/requirements.txt
FROM gcr.io/based-hardware-dev/python:3.11-slim-forky
WORKDIR /app
ENV PATH="/opt/venv/bin:$PATH"
# Patch OS packages in this layer before installing runtime deps (#7136).
RUN apt-get update && apt-get -y dist-upgrade \
&& apt-get -y install --no-install-recommends ffmpeg curl unzip \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /opt/venv /opt/venv
COPY plugins/ .
EXPOSE 8080
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]