File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,13 @@ ARG VERSION=0.0.0
1818ENV SETUPTOOLS_SCM_PRETEND_VERSION=${VERSION}
1919
2020RUN pip install --no-cache-dir --upgrade pip \
21- && pip install --no-cache-dir --prefix /install .[web]
21+ && pip install --no-cache-dir --prefix /install .[web] \
22+ && find /install -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true \
23+ && find /install -type f -name '*.pyc' -delete \
24+ && find /install -type f -name '*.pyo' -delete \
25+ && find /install -type d -name 'tests' -exec rm -rf {} + 2>/dev/null || true \
26+ && find /install -type d -name 'test' -exec rm -rf {} + 2>/dev/null || true \
27+ && find /install -name '*.dist-info' -type d -exec sh -c 'rm -f "$1"/RECORD "$1"/INSTALLER' sh {} \; 2>/dev/null || true
2228
2329FROM python:3.11-slim
2430
@@ -30,9 +36,8 @@ WORKDIR /app
3036
3137RUN apt-get update \
3238 && apt-get install -y --no-install-recommends ffmpeg \
33- && rm -rf /var/lib/apt/lists/*
34-
35- RUN useradd --create-home --shell /usr/sbin/nologin ttsfm
39+ && rm -rf /var/lib/apt/lists/* \
40+ && useradd --create-home --shell /usr/sbin/nologin ttsfm
3641
3742COPY --from=builder /install /usr/local
3843ENV PATH="/usr/local/bin:$PATH"
You can’t perform that action at this time.
0 commit comments