mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 12:19:06 +00:00
* build: move to uv * build: add packages declaration * build: move to python 3.12, as sentencespiece does not work on 3.13 * ci: remove pre-commit check, will be done in another branch. * ci: fix name checkout * ci: update lock and dockerfile * test: remove event_loop, not needed in python 3.12 * test: updated test due to av returning AudioFrame with 4096 samples instead of 1024 * build: prevent using fastapi cli, because there is no way to set default port I don't want to pass --port 1250 every time, so back on previous approach. I deactivated auto-reload for production. * ci: remove main.py * test: fix quirck with httpx
26 lines
653 B
Docker
26 lines
653 B
Docker
FROM python:3.12-slim
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
UV_LINK_MODE=copy
|
|
|
|
# builder install base dependencies
|
|
WORKDIR /tmp
|
|
RUN apt-get update && apt-get install -y curl && apt-get clean
|
|
ADD https://astral.sh/uv/install.sh /uv-installer.sh
|
|
RUN sh /uv-installer.sh && rm /uv-installer.sh
|
|
ENV PATH="/root/.local/bin/:$PATH"
|
|
|
|
# install application dependencies
|
|
RUN mkdir -p /app
|
|
WORKDIR /app
|
|
COPY pyproject.toml uv.lock /app/
|
|
RUN touch README.md && env uv sync --compile-bytecode --locked
|
|
|
|
# bootstrap
|
|
COPY alembic.ini runserver.sh /app/
|
|
COPY images /app/images
|
|
COPY migrations /app/migrations
|
|
COPY reflector /app/reflector
|
|
WORKDIR /app
|
|
CMD ["./runserver.sh"]
|