FROM python:3.10 RUN pip install --no-cache-dir pip==22.3.1 && \ pip install --no-cache-dir \ datasets \ "huggingface-hub>=0.19" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1" "pydantic~=1.0" COPY --chown=user ./requirements.txt requirements.txt RUN pip install --no-cache-dir --upgrade -r requirements.txt ENV PYTHONPATH=$HOME/app \ PYTHONUNBUFFERED=1 \ HF_HUB_ENABLE_HF_TRANSFER=1 \ GRADIO_ALLOW_FLAGGING=never \ GRADIO_NUM_PORTS=1 \ GRADIO_SERVER_NAME=0.0.0.0 \ GRADIO_THEME=huggingface \ TQDM_POSITION=-1 \ TQDM_MININTERVAL=1 \ SYSTEM=spaces COPY --chown=user . /app CMD ["python", "app.py"]