ARG BASE_IMAGE | |
FROM ${BASE_IMAGE} | |
# COPY deepspeed-fork /deepspeed-fork | |
# COPY /model_garden/PyTorch/generative_models/stable-diffusion-training/ /stable-diffusion-training/requirements.txt | |
RUN wget -q --output-document - https://raw.githubusercontent.com/HabanaAI/Model-References/master/PyTorch/generative_models/stable-diffusion-training/requirements.txt | grep -v "^-e" > /tmp/requirements.txt | |
RUN apt-get update -y && \ | |
pip install -r /tmp/requirements.txt && \ | |
apt-get install pdsh tmux -y | |
RUN mkdir ~/.ssh && \ | |
cd ~/.ssh && \ | |
sed -i 's/#Port 22/Port 3022/g' /etc/ssh/sshd_config && \ | |
sed -i 's/# Port 22/ Port 3022/g' /etc/ssh/ssh_config && \ | |
echo "/etc/init.d/ssh start \"-p 3022\"" >> ~/.bashrc && \ | |
echo "Host *" >> ~/.ssh/config && \ | |
echo "ForwardAgent yes" >> ~/.ssh/config && \ | |
echo "StrictHostKeyChecking no" >> ~/.ssh/config && \ | |
echo "UserKnownHostsFile /dev/null" >> ~/.ssh/config && \ | |
echo "LogLevel ERROR" >> ~/.ssh/config && \ | |
chmod 600 ~/.ssh/config | |
# COPY launch /launch | |
# RUN mv /launch/.deepspeed_env ~/ | |
RUN git config --global --add safe.directory /model_garden | |