Qilan2 commited on
Commit
0f7e591
·
verified ·
1 Parent(s): 5c64d6d

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +67 -0
Dockerfile ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM qilan28/ff:v1.0
2
+
3
+ USER root
4
+ RUN rm /home/vncuser/start.sh
5
+ RUN mkdir -p /data && \
6
+ chmod -R 777 /data
7
+ # 声明一个数据卷挂载点
8
+ # VOLUME /data/vncuser
9
+ RUN apk update && \
10
+ apk add --no-cache \
11
+ ca-certificates \
12
+ curl \
13
+ wget \
14
+ bzip2 \
15
+ p7zip \
16
+ pigz \
17
+ pv \
18
+ git \
19
+ git-lfs \
20
+ sudo \
21
+ python3 \
22
+ python3-dev \
23
+ py3-pip \
24
+ py3-requests \
25
+ py3-flask \
26
+ py3-pexpect \
27
+ py3-psutil
28
+
29
+ # # 设置工作目录
30
+ WORKDIR /data
31
+
32
+ USER root
33
+ # 直接使用系统Python环境安装包
34
+ RUN pip3 install --upgrade pip --break-system-packages && \
35
+ pip3 install --no-cache-dir --break-system-packages \
36
+ jupyterlab \
37
+ notebook \
38
+ pexpect \
39
+ psutil \
40
+ requests \
41
+ pytz \
42
+ flask \
43
+ kaggle \
44
+ PyYAML \
45
+ huggingface_hub \
46
+ ipykernel && \
47
+ pip3 install --upgrade huggingface_hub --break-system-packages
48
+
49
+ RUN wget -t 3 --retry-connrefused --timeout=30 -O "/home/vncuser/ff.sh" "https://huggingface.co/datasets/Qilan2/ff/raw/main/ff.sh" && \
50
+ wget -t 3 --retry-connrefused --timeout=30 -O "/data/ff.py" "https://huggingface.co/datasets/Qilan2/ff/raw/main/ff.py" && \
51
+ wget -t 3 --retry-connrefused --timeout=30 -O "/server-ff.sh" "https://huggingface.co/datasets/Qilan2/ff/raw/main/server-ff.sh" && \
52
+ chmod 777 /home/vncuser/ff.sh /server-ff.sh
53
+
54
+ USER vncuser
55
+ # # # 启动 Jupyterlab
56
+ # CMD ["jupyter", "lab", \
57
+ # "--ip=0.0.0.0", \
58
+ # "--port=7860", \
59
+ # "--no-browser", \
60
+ # "--allow-root", \
61
+ # "--notebook-dir=/data", \
62
+ # "--NotebookApp.token='123'", \
63
+ # "--ServerApp.disable_check_xsrf=True"]
64
+
65
+ RUN pwd && ls && ls /
66
+ CMD ["/server-ff.sh"]
67
+ # CMD ["nohup /fff.sh > /dev/null 2>&1 &","/server-ff.sh"]