Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ ARG VERSION=0.0.0
ENV SETUPTOOLS_SCM_PRETEND_VERSION=${VERSION}

RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir --prefix /install .[web]
&& pip install --no-cache-dir --prefix /install .[web] \
&& find /install -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true \
&& find /install -type f -name '*.pyc' -delete \
&& find /install -type f -name '*.pyo' -delete \
&& find /install -type d -name 'tests' -exec rm -rf {} + 2>/dev/null || true \
&& find /install -type d -name 'test' -exec rm -rf {} + 2>/dev/null || true \
&& find /install -name '*.dist-info' -type d -exec sh -c 'rm -f "$1"/RECORD "$1"/INSTALLER' sh {} \; 2>/dev/null || true

FROM python:3.11-slim

Expand All @@ -30,9 +36,8 @@ WORKDIR /app

RUN apt-get update \
&& apt-get install -y --no-install-recommends ffmpeg \
&& rm -rf /var/lib/apt/lists/*

RUN useradd --create-home --shell /usr/sbin/nologin ttsfm
&& rm -rf /var/lib/apt/lists/* \
&& useradd --create-home --shell /usr/sbin/nologin ttsfm

COPY --from=builder /install /usr/local
ENV PATH="/usr/local/bin:$PATH"
Expand Down