dockerfile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  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.1.0-beta.1/s5cmd_2.1.0-beta.1_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 flash-attn --no-build-isolation
  23. # Project Env
  24. WORKDIR /exp
  25. COPY requirements.txt .
  26. RUN pip3 install -r requirements.txt && pip3 install encodec --no-deps
  27. COPY . .
  28. RUN pip3 install -e .
  29. CMD /bin/zsh