Spaces:
Build error
Build error
FROM python:3 | |
WORKDIR /code | |
COPY ./requirements.txt /code/requirements.txt | |
RUN apt-get update && \ | |
apt-get install -y sudo tmux make tree && \ | |
apt-get install -y iputils-ping && \ | |
apt-get install -y git git-lfs | |
RUN --mount=type=secret,id=PASSWORD,mode=0444,required=true \ | |
useradd -m -u 1000 user && \ | |
echo "user:$(cat /run/secrets/PASSWORD)" | chpasswd && \ | |
adduser user sudo | |
RUN pip install -U pip pysocks | |
RUN pip install diffusers["torch"] transformers && \ | |
pip install diffusers["flax"] transformers | |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
USER user | |
ENV HOME=/home/user | |
ENV PATH=$HOME/.local/bin:$PATH | |
ENV SHELL=/bin/bash | |
WORKDIR $HOME | |
COPY --chown=user . $HOME/app | |
COPY .bashrc $HOME/.bashrc_append | |
RUN cat $HOME/.bashrc_append >> $HOME/.bashrc && \ | |
rm $HOME/.bashrc_append | |
EXPOSE 7860 | |
ENTRYPOINT [] | |
CMD ["/bin/bash", "./app/entrypoint.sh"] |