Spaces:
Runtime error
Runtime error
ARG PYTHON_VERSION=3.10 | |
FROM python:${PYTHON_VERSION} as base | |
RUN apt-get update && apt-get install -y \ | |
git-lfs \ | |
ffmpeg \ | |
libsm6 \ | |
libxext6 \ | |
cmake \ | |
libgl1-mesa-glx | |
RUN git lfs install | |
#COPY packages.txt /root/packages.txt | |
#RUN apt-get update && xargs -r -a /root/packages.txt apt-get install -y | |
RUN useradd -m user | |
USER user | |
FROM base as deps | |
ENV HOME /home/user | |
ENV PATH $HOME/.local/bin:$PATH | |
WORKDIR $HOME | |
RUN mkdir app | |
WORKDIR $HOME/app | |
ARG PIP_VERSION=22.1.1 | |
RUN pip install \ | |
pip==${PIP_VERSION} \ | |
datasets \ | |
huggingface-hub | |
COPY requirements.txt $HOME/app/requirements.txt | |
RUN pip install -r requirements.txt | |
from deps as app | |
COPY --chown=user ./app.py $HOME/app | |
ENV PYTHONPATH $HOME/app | |
ENV PYTHONUNBUFFERED 1 | |
ENV GRADIO_ALLOW_FLAGGING never | |
ENV GRADIO_NUM_PORTS 1 | |
ENV GRADIO_SERVER_NAME 0.0.0.0 | |
ENV GRADIO_THEME huggingface | |
ENV SYSTEM spaces | |