-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
010b031
commit 94c5ad1
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
FROM nvcr.io/nvidia/pytorch:22.12-py3 | ||
|
||
# Environment variables | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=Asia/Shanghai LANG=C.UTF-8 LC_ALL=C.UTF-8 PIP_NO_CACHE_DIR=1 | ||
|
||
# Install apt packages | ||
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 AI requirements and common tools | ||
autoconf automake autotools-dev build-essential ca-certificates \ | ||
make cmake ninja-build pkg-config g++ ccache yasm \ | ||
ccache doxygen graphviz plantuml \ | ||
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 sudo htop iotop \ | ||
cloc rsync xz-utils software-properties-common \ | ||
&& 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 Determined AI stuff | ||
#! ---EDIT notebook-requirements.txt TO ADD PYPI PACKAGES---- | ||
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.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/* | ||
|
||
RUN pip install \ | ||
albumentations opencv-python pudb imageio imageio-ffmpeg pytorch-lightning \ | ||
omegaconf test-tube streamlit setuptools pillow einops torch-fidelity \ | ||
transformers torchmetrics kornia | ||
|
||
WORKDIR /tmp | ||
RUN git clone https://github.com/CompVis/taming-transformers &&\ | ||
cd taming-transformers &&\ | ||
pip install . &&\ | ||
rm -rf /tmp/* | ||
|
||
RUN git clone https://github.com/openai/CLIP &&\ | ||
cd CLIP &&\ | ||
pip install . &&\ | ||
rm -rf /tmp/* |