-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (19 loc) · 719 Bytes
/
Dockerfile
File metadata and controls
21 lines (19 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM python:3.10-alpine as builder
WORKDIR /usr/src/app
RUN apk add libuv libuv-dev libsodium libsodium-dev
RUN apk add gcc musl-dev make g++ git
ENV SODIUM_INSTALL=system
RUN pip install virtualenv && virtualenv /app && /app/bin/pip install PyNaCL==1.4.0 uvloop==0.16.0 numpy cchardet
RUN pip install poetry --no-cache-dir
COPY . .
RUN poetry build
RUN /app/bin/pip install dist/`ls dist | grep .whl`[mysql,uvloop,speed,audio] --no-cache-dir
FROM python:3.10-alpine
RUN apk add bash
RUN apk add blas opus-dev ffmpeg libsodium # needed for audio
RUN apk add libuv
# Python can't find_library with musl gh-65921
ENV OPUS_PATH=/usr/lib/libopus.so
COPY --from=builder /app /app
WORKDIR /config
CMD ["/app/bin/beatrice"]