FROM python:3.9-slim WORKDIR /app RUN wget https://cotonoha-dic.s3-ap-northeast-1.amazonaws.com/unidic-3.1.0.zip -O /usr/local/lib/python3.9/site-packages/unidic/unidic.zip COPY . /app RUN apt-get update && apt-get install -y \ build-essential libsndfile1 \ && rm -rf /var/lib/apt/lists/* RUN pip install -e . COPY unidic.zip /usr/local/lib/python3.9/site-packages/unidic/unidic.zip RUN sed -i '93s/./#/' /usr/local/lib/python3.9/site-packages/unidic/download.py && \ sed -i '63s/./#/' /usr/local/lib/python3.9/site-packages/unidic/download.py && \ sed -i '93a \ \ \ \ download_and_clean()' /usr/local/lib/python3.9/site-packages/unidic/download.py RUN python -m unidic download RUN python melo/init_downloads.py CMD ["python", "./melo/app.py", "--host", "0.0.0.0", "--port", "7860"]