File size: 642 Bytes
557384d 988ebda 6b2bbe0 988ebda 6b2bbe0 7801c68 557384d 6b2bbe0 557384d 6b2bbe0 557384d 6b2bbe0 557384d 2f12c9d 988ebda |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
FROM python:3.9.17
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
RUN useradd -m -u 1000 user
USER user
ARG HOME=/home/user
ENV HOME=${HOME} \
PATH=${HOME}/.local/bin:$PATH \
PYTHONPATH=${HOME}/app \
PYTHONUNBUFFERED=1 \
GRADIO_ALLOW_FLAGGING=never \
GRADIO_NUM_PORTS=1 \
GRADIO_SERVER_NAME=0.0.0.0 \
GRADIO_THEME=huggingface \
SYSTEM=spaces \
HF_HOME=${HOME}/data/.huggingface
RUN mkdir -p ${HOME}/app
WORKDIR $HOME/app
COPY --chown=user ./app.py $HOME/app/
COPY --chown=user ./examples $HOME/app/examples
CMD ["python", "app.py"]
|