Spaces:
Sleeping
Sleeping
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"] |