dockerfile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. FROM nvcr.io/nvidia/pytorch:23.09-py3
  2. # Install system dependencies
  3. ENV DEBIAN_FRONTEND=noninteractive
  4. RUN apt-get update && apt-get install -y git curl build-essential ffmpeg libsm6 libxext6 libjpeg-dev \
  5. zlib1g-dev aria2 zsh openssh-server sudo python3.10-venv && \
  6. apt-get clean && rm -rf /var/lib/apt/lists/*
  7. # Install s5cmd
  8. RUN curl -L https://github.com/peak/s5cmd/releases/download/v2.2.0/s5cmd_2.2.0_Linux-64bit.tar.gz | tar xvz -C /tmp && \
  9. mv /tmp/s5cmd /usr/local/bin/s5cmd && s5cmd --help
  10. # Install code server and zsh
  11. RUN wget -c https://github.com/coder/code-server/releases/download/v4.5.1/code-server_4.5.1_amd64.deb && \
  12. dpkg -i ./code-server_4.5.1_amd64.deb && \
  13. code-server --install-extension ms-python.python && \
  14. rm ./code-server_4.5.1_amd64.deb && \
  15. sh -c "$(curl https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" "" --unattended
  16. # Set zsh as default shell
  17. RUN chsh -s /usr/bin/zsh
  18. ENV SHELL=/usr/bin/zsh
  19. # Setup flash-attn
  20. RUN pip3 install --upgrade pip && \
  21. pip3 install ninja packaging && \
  22. MAX_JOBS=4 pip3 install git+https://github.com/facebookresearch/xformers.git@v0.0.22
  23. # Project Env
  24. WORKDIR /exp
  25. COPY . .
  26. RUN pip3 install -e .
  27. CMD /bin/zsh