FROM python:3.11-slim # Install system dependencies and poetry RUN apt-get update && apt-get install -y \ git \ gcc \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # accept new ssh server RUN sed /^StrictHostKeyChecking/d /etc/ssh/ssh_config; \ echo StrictHostKeyChecking no >> /etc/ssh/ssh_config # Install and configure poetry RUN --mount=type=cache,target=/root/.cache \ pip install poetry RUN poetry config virtualenvs.create false WORKDIR /app # copy the app code COPY ./src . COPY poetry.lock . COPY pyproject.toml . # Install the project with all dependencies RUN --mount=type=cache,target=/root/.cache \ --mount=type=ssh,required=true \ poetry install --no-interaction --without dev --no-root # Expose the API port EXPOSE 7999 # Run the translator server directly from the module path CMD ["python", "-m", "auracast_translator.translator_server.translator_server"]