feat: postgres => sqlite

This commit is contained in:
Felix Spöttel
2023-02-08 14:09:16 +01:00
parent e995b1f2ff
commit 18921d34c6
16 changed files with 148 additions and 159 deletions

View File

@@ -0,0 +1,21 @@
FROM python:3.10 AS compile-image
ARG WHISPER_MODEL
WORKDIR /code
COPY --from=mwader/static-ffmpeg:5.1.2 /ffmpeg /usr/local/bin/
COPY --from=mwader/static-ffmpeg:5.1.2 /ffprobe /usr/local/bin/
COPY pyproject.toml .
RUN pip install --no-cache-dir --user .[worker,worker_dev]
COPY scripts/download_model.py .
RUN chmod +x download_model.py && python download_model.py ${WHISPER_MODEL}
ENV PYTHONIOENCODING=utf-8
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PATH=/root/.local/bin:$PATH
ENTRYPOINT ["watchmedo", "auto-restart", "-d" , "app/worker", "-p", "*.py", "--recursive", "celery", "--", "--app=app.worker.main.celery", "worker", "--loglevel=info", "--concurrency=1"]