-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
58 lines (55 loc) · 2.65 KB
/
Dockerfile
File metadata and controls
58 lines (55 loc) · 2.65 KB
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
FROM nvcr.io/nvidia/pytorch:23.04-py3
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Shanghai LANG=C.UTF-8 LC_ALL=C.UTF-8 PIP_NO_CACHE_DIR=1
RUN sed -i "s/archive.ubuntu.com/mirrors.ustc.edu.cn/g" /etc/apt/sources.list &&\
sed -i "s/security.ubuntu.com/mirrors.ustc.edu.cn/g" /etc/apt/sources.list &&\
rm -f /etc/apt/sources.list.d/* &&\
apt-get update && apt-get upgrade -y &&\
apt-get install -y --no-install-recommends \
# Determined requirements and common tools
autoconf automake autotools-dev build-essential ca-certificates \
make cmake ninja-build pkg-config g++ ccache yasm \
daemontools krb5-user ibverbs-providers libibverbs1 \
libkrb5-dev librdmacm1 libssl-dev libtool \
libnuma1 libnuma-dev libpmi2-0-dev \
openssh-server openssh-client pkg-config nfs-common \
## Tools
git curl wget unzip nano net-tools htop iotop \
cloc rsync xz-utils software-properties-common \
ffmpeg \
python3-tk \
&& rm /etc/ssh/ssh_host_ecdsa_key \
&& rm /etc/ssh/ssh_host_ed25519_key \
&& rm /etc/ssh/ssh_host_rsa_key \
&& cp /etc/ssh/sshd_config /etc/ssh/sshd_config_bak \
&& sed -i "s/^.*X11Forwarding.*$/X11Forwarding yes/" /etc/ssh/sshd_config \
&& sed -i "s/^.*X11UseLocalhost.*$/X11UseLocalhost no/" /etc/ssh/sshd_config \
&& grep "^X11UseLocalhost" /etc/ssh/sshd_config || echo "X11UseLocalhost no" >> /etc/ssh/sshd_config \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Conda and Determined AI stuff
WORKDIR /tmp
ENV PYTHONUNBUFFERED=1 PYTHONFAULTHANDLER=1 PYTHONHASHSEED=0
ENV JUPYTER_CONFIG_DIR=/run/determined/jupyter/config
ENV JUPYTER_DATA_DIR=/run/determined/jupyter/data
ENV JUPYTER_RUNTIME_DIR=/run/determined/jupyter/runtime
RUN git clone https://github.com/LingzheZhao/determinedai-container-scripts &&\
cd determinedai-container-scripts &&\
git checkout v0.2.1 &&\
pip config set global.index-url https://mirrors.bfsu.edu.cn/pypi/web/simple &&\
pip install determined && pip uninstall -y determined &&\
pip install -r notebook-requirements.txt &&\
pip install -r additional-requirements.txt &&\
./add_det_nobody_user.sh &&\
./install_libnss_determined.sh &&\
rm -rf /tmp/*
# Build & install pytorch extensions
ENV TORCH_CUDA_ARCH_LIST="8.6;8.9" TCNN_CUDA_ARCHITECTURES="86;89"
ARG MAX_JOBS 32
RUN git clone https://github.com/ashawkey/torch-ngp &&\
cd torch-ngp &&\
sed -i -e '/^torch$/d' requirements.txt &&\
pip install -r requirements.txt &&\
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch &&\
bash scripts/install_ext.sh &&\
rm -rf /tmp/*