Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -7
Dockerfile
CHANGED
@@ -1,19 +1,22 @@
|
|
1 |
FROM cnstark/pytorch:2.0.1-py3.10.11-ubuntu22.04
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
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 /
|
12 |
RUN chmod a+x install.sh && chmod a+x start-webui.sh
|
13 |
-
RUN /
|
14 |
|
15 |
-
|
16 |
-
|
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"]
|