File size: 948 Bytes
e532f72
a032573
1f4b994
 
 
a575a13
 
 
 
a032573
e532f72
e7f1484
 
 
a032573
a575a13
8aa87fa
a575a13
a032573
a575a13
 
00bfa8f
8c96440
 
 
 
4629526
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
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 /home/hf/.cache
ENV HF_HOME /home/hf/.cache

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/

CMD ["./start-webui.sh"]