From 91dfbd1e326345e573302a7ef5532c6377d7ca67 Mon Sep 17 00:00:00 2001 From: helloyongyang Date: Sun, 5 Jul 2026 16:00:40 +0800 Subject: [PATCH] update docker --- dockerfiles/Dockerfile_cu130 | 4 + dockerfiles/Dockerfile_cu130_conda | 112 ++++++++++++++++++++++++ dockerfiles/Dockerfile_cu130_ros2_jazzy | 6 +- 3 files changed, 119 insertions(+), 3 deletions(-) create mode 100644 dockerfiles/Dockerfile_cu130_conda diff --git a/dockerfiles/Dockerfile_cu130 b/dockerfiles/Dockerfile_cu130 index ff6b0ae76..8186e6a3d 100644 --- a/dockerfiles/Dockerfile_cu130 +++ b/dockerfiles/Dockerfile_cu130 @@ -34,6 +34,10 @@ RUN pip install --no-cache-dir jsonschema pymongo mooncake-transfer-engine tos z 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 +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 diff --git a/dockerfiles/Dockerfile_cu130_conda b/dockerfiles/Dockerfile_cu130_conda new file mode 100644 index 000000000..b057a53a6 --- /dev/null +++ b/dockerfiles/Dockerfile_cu130_conda @@ -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 + +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]" + +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 . + +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 + +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 . + +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 + +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 + +# 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 + +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 . + +# 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 diff --git a/dockerfiles/Dockerfile_cu130_ros2_jazzy b/dockerfiles/Dockerfile_cu130_ros2_jazzy index 8a3c6f929..87fb264c8 100644 --- a/dockerfiles/Dockerfile_cu130_ros2_jazzy +++ b/dockerfiles/Dockerfile_cu130_ros2_jazzy @@ -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 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)