﻿# Dependency resolution and the base digest are explicit preparation gates.
# See README.md; this Dockerfile does not fetch weights or use an operational image.
ARG ENGINE_BASE_IMAGE
FROM ${ENGINE_BASE_IMAGE}
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1
WORKDIR /app
COPY .local-s2s-build/requirements.lock /build/requirements.lock
RUN pip install --no-cache-dir --only-binary=:all: --require-hashes -r /build/requirements.lock
COPY .local-s2s-build/upstream /opt/speech-to-speech
RUN pip install --no-deps --no-build-isolation /opt/speech-to-speech
COPY pyproject.toml alembic.ini /app/
COPY app /app/app
COPY services/local_s2s /app/services/local_s2s
COPY migrations /app/migrations
COPY .local-s2s-build/build-manifest.json /app/engine-build-manifest.json
RUN pip install --no-deps --no-build-isolation -e /app
CMD ["python", "-m", "services.local_s2s.engine", "--allow-paid-startup"]
