forked from OwlAIProject/Owl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (33 loc) · 903 Bytes
/
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
FROM python:3.11-slim as base
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
curl \
git \
ffmpeg \
pkg-config \
libcairo2-dev \
portaudio19-dev \
libsndfile1 \
libgomp1 \
libjpeg-dev \
libpng-dev \
cmake && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir poetry && \
poetry --version
ENV PATH="/root/.local/bin:$PATH"
WORKDIR /app
COPY . /app
RUN poetry config virtualenvs.create false && \
poetry install -vvv && \
rm -rf /root/.cache/pypoetry /root/.cache/pip
RUN echo '#!/bin/sh\n\
if [ -z "$CONFIG_FILE" ]; then\n\
poetry run owl serve --host 0.0.0.0\n\
else\n\
poetry run owl serve --host 0.0.0.0 --config "$CONFIG_FILE"\n\
fi' > /entrypoint.sh && \
chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]