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" RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ apt-get install -y nodejs 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 \ GRADIO_SSR_MODE=True \ TQDM_POSITION=-1 \ TQDM_MININTERVAL=1 \ SYSTEM=spaces RUN useradd -m -u 1000 user WORKDIR /app COPY --chown=user ./requirements.txt requirements.txt RUN pip install --no-cache-dir --upgrade -r requirements.txt COPY --chown=user . /app CMD ["python", "run.py"]