|
FROM python:3.10.9 |
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install -y ffmpeg mecab libmecab-dev mecab-ipadic-utf8 git make curl xz-utils file sudo && \ |
|
apt-get clean |
|
|
|
|
|
RUN pip install --no-cache-dir mecab-python3 unidic-lite |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
COPY . . |
|
|
|
|
|
RUN pip install --no-cache-dir --upgrade -r requirements.txt |
|
|
|
|
|
ENV XDG_CACHE_HOME=/app/.local |
|
RUN mkdir -p /app/.local && chmod -R 777 /app/.local |
|
|
|
|
|
ENV NUMBA_CACHE_DIR=/tmp/numba_cache |
|
RUN mkdir -p /tmp/numba_cache && chmod -R 777 /tmp/numba_cache |
|
|
|
|
|
ENV MPLCONFIGDIR=/tmp/matplotlib |
|
RUN mkdir -p /tmp/matplotlib && chmod -R 777 /tmp/matplotlib |
|
|
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |
|
|