File size: 2,027 Bytes
0f7e591
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b0a1b29
0f7e591
 
1a8720c
0f7e591
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM qilan28/ff:v1.0

USER root
RUN rm /home/vncuser/start.sh
RUN mkdir -p /data && \
    chmod -R 777 /data
# 声明一个数据卷挂载点
# VOLUME /data/vncuser
RUN apk update && \
    apk add --no-cache \
    ca-certificates \
    curl \
    wget \
    bzip2 \
    p7zip \
    pigz \
    pv \
    git \
    git-lfs \
    sudo \
    python3 \
    python3-dev \
    py3-pip \
    py3-requests \
    py3-flask \
    py3-pexpect \
    py3-psutil
    
# # 设置工作目录
WORKDIR /data

USER root
# 直接使用系统Python环境安装包
RUN pip3 install --upgrade pip --break-system-packages && \
    pip3 install --no-cache-dir --break-system-packages \
        jupyterlab \
        notebook \
        pexpect \
        psutil \
        requests \
        pytz \
        flask \
        kaggle \
        PyYAML \
        huggingface_hub \
        ipykernel && \
    pip3 install --upgrade huggingface_hub --break-system-packages

RUN wget -t 3 --retry-connrefused --timeout=30 -O "/home/vncuser/ff.sh" "https://huggingface.co/datasets/Qilan2/ff/raw/main/ff.sh" && \
    wget -t 3 --retry-connrefused --timeout=30 -O "/data/bf.py" "https://huggingface.co/datasets/Qilan2/ff/raw/main/bf.py" && \
    wget -t 3 --retry-connrefused --timeout=30 -O "/data/ff.py" "https://huggingface.co/datasets/Qilan2/ff/raw/main/ff.py" && \
    wget -t 3 --retry-connrefused --timeout=30 -O "/server-ff.sh" "https://huggingface.co/datasets/Qilan2/ff/raw/main/server-ff.sh" && \
    wget -t 3 --retry-connrefused --timeout=30 -O "/data/b.py" "https://huggingface.co/datasets/Qilan2/st-server/raw/main/sbx/b.py" && \
    chmod 777 /home/vncuser/ff.sh /server-ff.sh

USER vncuser
# # # 启动 Jupyterlab
# CMD ["jupyter", "lab", \
#     "--ip=0.0.0.0", \
#     "--port=7860", \
#     "--no-browser", \
#     "--allow-root", \
#     "--notebook-dir=/data", \
#     "--NotebookApp.token='123'", \
#     "--ServerApp.disable_check_xsrf=True"]

RUN pwd && ls && ls /
CMD ["/server-ff.sh"]
# CMD ["nohup /fff.sh > /dev/null 2>&1 &","/server-ff.sh"]