-
Notifications
You must be signed in to change notification settings - Fork 233
update docker #1225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
update docker #1225
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| FROM nvidia/cuda:13.0.3-cudnn-devel-ubuntu24.04 AS base | ||
| # ubuntu 24.04 conda python 3.11 torch 2.11 cuda 13.0 | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| ENV DEBIAN_FRONTEND=noninteractive | ||
| ENV LANG=C.UTF-8 | ||
| ENV LC_ALL=C.UTF-8 | ||
| ENV LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH | ||
| ENV LIBRARY_PATH=/usr/local/cuda/lib64/stubs:$LIBRARY_PATH | ||
|
|
||
| RUN apt-get update && apt-get install -y vim tmux zip unzip bzip2 wget git git-lfs build-essential libibverbs-dev ca-certificates \ | ||
| curl iproute2 libsm6 libxext6 kmod ccache libnuma-dev libssl-dev flex bison libgtk-3-dev libpango1.0-dev software-properties-common \ | ||
| libsoup2.4-dev libnice-dev libopus-dev libvpx-dev libx264-dev libsrtp2-dev libglib2.0-dev libdrm-dev libjpeg-dev libpng-dev \ | ||
| && apt-get clean && rm -rf /var/lib/apt/lists/* && git lfs install | ||
|
|
||
| RUN add-apt-repository -y ppa:ubuntuhandbook1/ffmpeg8 && apt-get update && apt-get install -y ffmpeg | ||
|
|
||
| RUN curl -fsSL -v -o /app/miniconda.sh -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh" | ||
| RUN chmod +x /app/miniconda.sh && \ | ||
| bash /app/miniconda.sh -b -p /app/miniconda && \ | ||
| rm /app/miniconda.sh && \ | ||
| /app/miniconda/bin/conda install python=3.11 -y && \ | ||
| /app/miniconda/bin/conda clean -ya | ||
| ENV PATH="/app/miniconda/bin:$PATH" | ||
|
|
||
| RUN pip install --no-cache-dir packaging ninja cmake scikit-build-core uv meson ruff pre-commit fastapi uvicorn requests -U | ||
|
|
||
| RUN pip install torch==2.11.0 torchvision==0.26.0 torchaudio==2.11.0 --index-url https://download.pytorch.org/whl/cu130 | ||
|
|
||
| RUN pip install vllm==0.24.0 | ||
|
|
||
| RUN pip install sglang-kernel==0.4.4 | ||
|
|
||
| RUN pip install --no-cache-dir diffusers transformers tokenizers accelerate safetensors opencv-python numpy | ||
|
|
||
| RUN pip install --no-cache-dir imageio imageio-ffmpeg einops loguru qtorch ftfy av decord matplotlib peft | ||
|
|
||
| RUN pip install --no-cache-dir torchao torchcodec modelscope Pillow omegaconf librosa scipy debugpy | ||
|
|
||
| RUN pip install --no-cache-dir jsonschema pymongo mooncake-transfer-engine tos zmq graphviz pybind11 | ||
|
|
||
| RUN pip install --no-cache-dir bson aio-pika PyJWT asyncpg>=0.27.0 aioboto3>=12.0.0 alibabacloud_dypnsapi20170525==1.2.2 redis==6.4.0 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Installing the standalone |
||
|
|
||
| RUN pip install --no-cache-dir future easydict termcolor | ||
|
|
||
| RUN pip install --no-cache-dir -U setuptools wheel | ||
|
|
||
| RUN pip list | ||
|
|
||
| # FA2 Whl: https://github.com/alkemiik-coder/FlashAttention-2.8.3-Custom-Linux-Wheels | ||
| RUN pip install --no-cache-dir https://github.com/alkemiik-coder/FlashAttention-2.8.3-Custom-Linux-Wheels/releases/download/FA.2.8.3-custom-linux-wheels-x86_64/flash_attn-2.8.3+cu130torch2.11cxx11abiTRUEfullsm80sm90sm100sm120nvcc130-cp311-cp311-linux_x86_64.whl | ||
|
|
||
| # FA3 Whl: https://github.com/windreamer/flash-attention3-wheels | ||
| RUN pip install --no-cache-dir https://github.com/windreamer/flash-attention3-wheels/releases/download/2026.05.11-5e0e3b1/flash_attn_3-3.0.0%2B20260511.cu130torch2110cxx11abitrue.ab6632-cp39-abi3-linux_x86_64.whl | ||
|
|
||
| # FA4 build from source: https://github.com/Dao-AILab/flash-attention | ||
| RUN git clone https://github.com/Dao-AILab/flash-attention.git --recursive && cd flash-attention && pip install -e "flash_attn/cute[dev,cu13]" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Installing |
||
|
|
||
| RUN git clone https://github.com/ModelTC/SageAttention.git --depth 1 | ||
|
|
||
| RUN cd SageAttention && \ | ||
| CUDA_ARCHITECTURES="8.0,8.6,8.9,9.0,12.0" \ | ||
| EXT_PARALLEL=4 \ | ||
| NVCC_APPEND_FLAGS="--threads 8" \ | ||
| MAX_JOBS=32 \ | ||
| pip install --no-cache-dir --no-build-isolation -v -e . | ||
|
Comment on lines
+60
to
+67
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Installing |
||
|
|
||
| RUN git clone https://github.com/ModelTC/SageAttention-1104.git --depth 1 | ||
|
|
||
| RUN cd SageAttention-1104/sageattention3_blackwell && python setup.py install && rm -rf build | ||
|
Comment on lines
+69
to
+71
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The cloned |
||
|
|
||
| RUN git clone https://github.com/SandAI-org/MagiAttention.git --recursive | ||
|
|
||
| RUN cd MagiAttention && MAGI_ATTENTION_BUILD_COMPUTE_CAPABILITY="90,100" pip install --no-cache-dir --no-build-isolation -v -e . | ||
|
Comment on lines
+73
to
+75
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Installing |
||
|
|
||
| COPY lightx2v_kernel /app/lightx2v_kernel | ||
|
|
||
| RUN git clone https://github.com/NVIDIA/cutlass.git --depth 1 && cd /app/lightx2v_kernel && MAX_JOBS=32 && CMAKE_BUILD_PARALLEL_LEVEL=4 \ | ||
| uv build --wheel \ | ||
| -Cbuild-dir=build . \ | ||
| -Ccmake.define.CUTLASS_PATH=/app/cutlass \ | ||
| --verbose \ | ||
| --color=always \ | ||
| --no-build-isolation \ | ||
| && pip install dist/*whl --force-reinstall --no-deps \ | ||
| && rm -rf /app/lightx2v_kernel && rm -rf /app/cutlass | ||
|
Comment on lines
+79
to
+87
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The environment variable |
||
|
|
||
| RUN git clone --depth 1 https://github.com/linux-rdma/rdma-core.git && \ | ||
| cd rdma-core/ && \ | ||
| mkdir build-ibv57 && \ | ||
| cd build-ibv57 && \ | ||
| cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DNO_MAN_PAGES=1 && \ | ||
| make -j"$(nproc)" && \ | ||
| make install && \ | ||
| ldconfig | ||
|
Comment on lines
+89
to
+96
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The cloned |
||
|
|
||
| # for base docker | ||
| RUN git clone https://github.com/ModelTC/q8_kernels.git --depth 1 | ||
| RUN cd q8_kernels && git submodule init && git submodule update && python setup.py install && rm -rf build | ||
|
Comment on lines
+99
to
+100
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The cloned |
||
|
|
||
| RUN git clone https://github.com/ModelTC/SpargeAttn.git --depth 1 | ||
| RUN cd SpargeAttn && TORCH_CUDA_ARCH_LIST="8.0;8.6;8.9;9.0" pip install --no-cache-dir --no-build-isolation -v -e . | ||
|
Comment on lines
+102
to
+103
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Installing |
||
|
|
||
| # for 5090 docker | ||
| # RUN git clone https://github.com/ModelTC/LTX-Video-Q8-Kernels.git --depth 1 | ||
| # RUN cd LTX-Video-Q8-Kernels && git submodule init && git submodule update && python setup.py install && rm -rf build | ||
|
|
||
| # RUN git clone https://github.com/ModelTC/SpargeAttn.git --depth 1 | ||
| # RUN cd SpargeAttn && TORCH_CUDA_ARCH_LIST="12.0" pip install --no-cache-dir --no-build-isolation -v -e . | ||
|
|
||
| WORKDIR /workspace | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| FROM lightx2v/lightx2v:26062001-cu130 AS base | ||
| # ubuntu 24.04 python 3.12 torch 2.11 cuda 13.0 | ||
| FROM lightx2v/lightx2v:26070401-cu130 AS base | ||
| # ubuntu 24.04 python 3.11 torch 2.11 cuda 13.0 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The base image |
||
|
|
||
| RUN apt update && apt install locales | ||
| RUN locale-gen en_US en_US.UTF-8 | ||
|
|
@@ -22,7 +22,7 @@ RUN apt update --fix-missing && apt install -y ros-dev-tools | |
|
|
||
| RUN pip uninstall setuptools-scm | ||
| RUN pip install catkin_pkg empy pyqt5-sip PyQt5 sip==6.15.3 setuptools==79.0.1 | ||
| RUN pip install hydra-core==1.2.0 robosuite==1.4.0 bddl==1.0.1 coverage==7.6.1 gym==0.25.2 mujoco==3.9.0 future easydict termcolor | ||
| RUN pip install hydra-core==1.2.0 robosuite==1.4.0 bddl==1.0.1 coverage==7.6.1 gym==0.25.2 mujoco==3.9.0 | ||
|
|
||
|
|
||
| # Install ROS2 Jazzy (Install from apt on Ubuntu 24.04) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PyTorch, torchvision, and torchaudio are extremely large packages. Installing them without
--no-cache-dircausespipto cache the downloaded wheels in/root/.cache/pip, which unnecessarily doubles the required disk space and significantly increases the final Docker image size. The same applies tovllmandsglang-kernelon lines 31 and 33.