mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
* ci: use github-token to get around potential api throttling * build: put pyannote-audio separate to the project * fix: now that we have a readme, use it * build: add UV_NO_CACHE
31 lines
803 B
Docker
31 lines
803 B
Docker
FROM python:3.12-slim
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
UV_LINK_MODE=copy \
|
|
UV_NO_CACHE=1
|
|
|
|
# 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 README.md /app/
|
|
RUN uv sync --compile-bytecode --locked
|
|
|
|
# pre-download nltk packages
|
|
RUN uv run python -c "import nltk; nltk.download('punkt_tab'); nltk.download('averaged_perceptron_tagger_eng')"
|
|
|
|
# bootstrap
|
|
COPY alembic.ini runserver.sh /app/
|
|
COPY images /app/images
|
|
COPY migrations /app/migrations
|
|
COPY reflector /app/reflector
|
|
WORKDIR /app
|
|
|
|
CMD ["./runserver.sh"]
|