# FROM python:3.9 FROM python:3.7-slim-buster WORKDIR /code COPY ./requirements.txt /code/requirements.txt 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/deepspeech-ht/model COPY . . RUN chmod -R 777 /code CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]