lemonteaa commited on
Commit
a575a13
·
1 Parent(s): 4629526

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -7
Dockerfile CHANGED
@@ -1,19 +1,22 @@
1
  FROM cnstark/pytorch:2.0.1-py3.10.11-ubuntu22.04
2
 
3
- WORKDIR /code
 
 
 
 
4
 
5
- RUN apt-get update && apt-get install -y git
6
  #RUN pip3 install torch==2.0.1 --index-url https://download.pytorch.org/whl/cpu
7
  #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
8
 
9
  RUN git clone https://github.com/rupeshs/fastsdcpu
10
 
11
- WORKDIR /code/fastsdcpu
12
  RUN chmod a+x install.sh && chmod a+x start-webui.sh
13
- RUN /code/fastsdcpu/install.sh || { exit 0; }
14
 
15
- RUN apt-get install -y sudo
16
- RUN useradd -rm -d /home/hf -s /bin/bash -g root -G sudo -u 1001 hf
17
- USER hf
18
 
19
  CMD ["./start-webui.sh"]
 
1
  FROM cnstark/pytorch:2.0.1-py3.10.11-ubuntu22.04
2
 
3
+ RUN apt-get install -y sudo
4
+ RUN useradd -rm -d /home/hf -s /bin/bash -g root -G sudo -u 1001 hf
5
+ USER hf
6
+
7
+ WORKDIR /home/hf
8
 
9
+ RUN sudo apt-get update && sudo apt-get install -y git
10
  #RUN pip3 install torch==2.0.1 --index-url https://download.pytorch.org/whl/cpu
11
  #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
12
 
13
  RUN git clone https://github.com/rupeshs/fastsdcpu
14
 
15
+ WORKDIR /home/hf/fastsdcpu
16
  RUN chmod a+x install.sh && chmod a+x start-webui.sh
17
+ RUN /home/hf/fastsdcpu/install.sh || { exit 0; }
18
 
19
+ ENV TRANSFORMERS_CACHE /home/hf/.cache
20
+ ENV HF_HOME /home/hf/.cache
 
21
 
22
  CMD ["./start-webui.sh"]