Spaces:
Sleeping
Sleeping
File size: 1,201 Bytes
e532f72 a032573 1f4b994 a575a13 a032573 e532f72 e7f1484 a032573 a575a13 8aa87fa a575a13 a032573 d38ff54 00bfa8f d38ff54 434aa65 87e97b6 d38ff54 434aa65 8c96440 87e97b6 434aa65 |
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 35 36 |
FROM cnstark/pytorch:2.0.1-py3.10.11-ubuntu22.04
RUN apt-get update && apt-get install -y git
#RUN apt-get install -y sudo
RUN useradd -rm -d /home/hf -s /bin/bash -g root -G sudo -u 1001 hf
USER hf
WORKDIR /home/hf
#RUN pip3 install torch==2.0.1 --index-url https://download.pytorch.org/whl/cpu
#RUN git clone https://github.com/rupeshs/fastsdcpu && chmod a+x ./fastsdcpu/install.sh && chmod a+x ./fastsdcpu/start-webui.sh && /code/fastsdcpu/install.sh
RUN git clone https://github.com/rupeshs/fastsdcpu
WORKDIR /home/hf/fastsdcpu
RUN chmod a+x install.sh && chmod a+x start-webui.sh
RUN /home/hf/fastsdcpu/install.sh || { exit 0; }
ENV TRANSFORMERS_CACHE /tmp
ENV HF_HOME /tmp
#RUN mkdir -p /home/hf/.cache/hub
#RUN chown -R hf /home/hf/.cache && chown -R hf /home/hf/fastsdcpu
#RUN chmod a+rwx /home/hf/.cache/hub && chmod a+rwx /home/hf/fastsdcpu/ && chmod a+rwx /home/hf/fastsdcpu/configs/
COPY ./launch.py /home/hf/fastsdcpu/src/launch.py
COPY ./mystart.sh /home/hf/fastsdcpu/mystart.sh
USER root
RUN chown -R hf /home/hf/fastsdcpu && chmod a+rwx /home/hf/fastsdcpu/ && chmod a+rwx /home/hf/fastsdcpu/configs/
RUN chmod a+x /home/hf/fastsdcpu/mystart.sh
USER hf
CMD ["./mystart.sh"] |