forked from TartuNLP/text-to-speech-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (26 loc) · 785 Bytes
/
Dockerfile
File metadata and controls
35 lines (26 loc) · 785 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
26
27
28
29
30
31
32
33
34
35
FROM python:3.10-alpine
# Install system dependencies
RUN apk update && \
apk add --no-cache \
gcc \
libffi-dev \
musl-dev \
git \
python3-dev \
py3-pip \
build-base
ENV PYTHONIOENCODING=utf-8
WORKDIR /app
RUN addgroup -S app && adduser -S -D -G app app && chown -R app:app /app
USER app
ENV PATH="/home/app/.local/bin:${PATH}"
COPY --chown=app:app requirements.txt .
RUN pip install --user --upgrade pip && \
pip install --user cython && \
pip install --user -r requirements.txt && \
rm requirements.txt
COPY --chown=app:app . .
ARG API_VERSION
ENV API_VERSION=$API_VERSION
EXPOSE 8000
ENTRYPOINT ["uvicorn", "app:app", "--host", "0.0.0.0", "--proxy-headers", "--log-config", "config/logging.prod.ini"]