Dockerfile 2.2 KB
Newer Older
robotcator's avatar
robotcator committed
1
FROM nvcr.io/nvidia/pytorch:22.05-py3
Guolin Ke's avatar
Guolin Ke committed
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

RUN APT_INSTALL="apt-get install -y --no-install-recommends" && \
    rm -rf /var/lib/apt/lists/* \
           /etc/apt/sources.list.d/cuda.list \
           /etc/apt/sources.list.d/nvidia-ml.list && \
    apt-get update && \
    DEBIAN_FRONTEND=noninteractive $APT_INSTALL \
        software-properties-common \
        && \
    apt-get update && \
    DEBIAN_FRONTEND=noninteractive $APT_INSTALL \
        build-essential \
        apt-utils \
        ca-certificates \
        wget \
        git \
        vim \
        libssl-dev \
        curl \
        unzip \
        unrar \
        cmake \
        net-tools \
        sudo \
        autotools-dev \
        rsync \
        jq \
        openssh-server \
        tmux \
        screen \
        htop \
        pdsh \
        openssh-client \
        lshw \
        dmidecode \
        util-linux \
        automake \
        autoconf \
        libtool \
        net-tools \
        pciutils \
        libpci-dev \
        libaio-dev \
        libcap2 \
        libtinfo5 \
        fakeroot \
        devscripts \
        debhelper \
Guolin Ke's avatar
Guolin Ke committed
50
51
        nfs-common \
        bc
Guolin Ke's avatar
Guolin Ke committed
52

Guolin Ke's avatar
Guolin Ke committed
53
54
55
RUN  pip uninstall -y torch torchvision torchtext && \
pip uninstall -y torch torchvision torchtext && \
rm -rf ~/.cache/pip && \
Guolin Ke's avatar
Guolin Ke committed
56
57
conda clean -ya

Guolin Ke's avatar
Guolin Ke committed
58
RUN conda install -y pyyaml tensorboardX && \
Guolin Ke's avatar
Guolin Ke committed
59
60
61
62
63
64
65
66
67
    conda clean -ya

# RUN ldconfig

# # ==================================================================
# # pytorch
# # ------------------------------------------------------------------
ENV TORCH_CUDA_ARCH_LIST "7.0;7.5;8.0"

Guolin Ke's avatar
Guolin Ke committed
68
RUN conda install -y ninja typing && \
Guolin Ke's avatar
Guolin Ke committed
69
70
    conda clean -ya

Guolin Ke's avatar
Guolin Ke committed
71
72
RUN pip3 install --upgrade sentry-sdk requests

robotcator's avatar
robotcator committed
73
RUN pip3 install torch==2.0.0+cu117  --index-url https://download.pytorch.org/whl/cu117 && rm -rf ~/.cache/pip
Guolin Ke's avatar
Guolin Ke committed
74
75
76
77

RUN cd /tmp && \
    git clone https://github.com/dptech-corp/Uni-Core && \
    cd Uni-Core && \
Guolin Ke's avatar
Guolin Ke committed
78
79
    python setup.py install && \
    rm -rf  /tmp/* && rm -rf ~/.cache/pip 
Guolin Ke's avatar
Guolin Ke committed
80

Guolin Ke's avatar
Guolin Ke committed
81
RUN pip3 install --no-cache-dir tokenizers lmdb biopython ml-collections timeout-decorator urllib3 tree dm-tree && rm -rf ~/.cache/pip 
Guolin Ke's avatar
Guolin Ke committed
82
83
84
85
86
87

RUN ldconfig && \
    apt-get clean && \
    apt-get autoremove && \
    rm -rf /var/lib/apt/lists/* /tmp/* && \
    conda clean -ya