FROM python:3.9 WORKDIR /code COPY ./requirements.txt /code/requirements.txt RUN pip install --no-cache-dir --upgrade pip setuptools && \ pip install --no-cache-dir seqeval RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt RUN pip install -r requirements.txt ENV HF_HOME=/code/transformers_cache ENV TRANSFORMERS_CACHE=/code/transformers_cache ENV HF_DATASETS_CACHE=/code/datasets_cache ENV TOKENIZERS_PARALLELISM=true VOLUME /code/transformers_cache VOLUME /code/datasets_cache VOLUME /code/app VOLUME /code/models COPY . . RUN chmod -R 777 /code # Install missing dependencies RUN pip install rich RUN pip install transformers RUN transformers-cli download facebook/m2m100_1.2B RUN transformers-cli download facebook/m2m100_418M # facebook/m2m100_418M # facebook/m2m100_1.2B CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]