Commit 80d43e3a authored by Yang Yong(雍洋)'s avatar Yang Yong(雍洋) Committed by GitHub
Browse files

update docker (#324)

parent a1db6fa0
...@@ -7,10 +7,10 @@ ENV LANG=C.UTF-8 ...@@ -7,10 +7,10 @@ ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8 ENV LC_ALL=C.UTF-8
ENV LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH ENV LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
RUN apt-get update && apt-get install -y vim tmux zip unzip wget git build-essential libibverbs-dev ca-certificates \ RUN apt-get update && apt-get install -y vim tmux zip unzip 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 \ curl iproute2 libsm6 libxext6 kmod ccache libnuma-dev libssl-dev flex bison libgtk-3-dev libpango1.0-dev \
libsoup2.4-dev libnice-dev libopus-dev libvpx-dev libx264-dev libsrtp2-dev libglib2.0-dev libdrm-dev\ libsoup2.4-dev libnice-dev libopus-dev libvpx-dev libx264-dev libsrtp2-dev libglib2.0-dev libdrm-dev\
&& apt-get clean && rm -rf /var/lib/apt/lists/* && apt-get clean && rm -rf /var/lib/apt/lists/* && git lfs install
RUN pip install --no-cache-dir packaging ninja cmake scikit-build-core uv meson ruff pre-commit fastapi uvicorn requests -U RUN pip install --no-cache-dir packaging ninja cmake scikit-build-core uv meson ruff pre-commit fastapi uvicorn requests -U
...@@ -22,9 +22,9 @@ RUN git clone https://github.com/sgl-project/sglang.git && cd sglang/sgl-kernel ...@@ -22,9 +22,9 @@ RUN git clone https://github.com/sgl-project/sglang.git && cd sglang/sgl-kernel
&& make build && make clean && make build && make clean
RUN pip install --no-cache-dir diffusers transformers tokenizers accelerate safetensors opencv-python numpy imageio \ RUN pip install --no-cache-dir diffusers transformers tokenizers accelerate safetensors opencv-python numpy imageio \
imageio-ffmpeg einops loguru qtorch ftfy easydict imageio-ffmpeg einops loguru qtorch ftfy easydict av
RUN conda install conda-forge::ffmpeg=8.0.0 -y && ln -s /opt/conda/bin/ffmpeg /usr/bin/ffmpeg RUN conda install conda-forge::ffmpeg=8.0.0 -y && ln -s /opt/conda/bin/ffmpeg /usr/bin/ffmpeg && conda clean -all -y
RUN git clone https://github.com/Dao-AILab/flash-attention.git --recursive RUN git clone https://github.com/Dao-AILab/flash-attention.git --recursive
...@@ -41,7 +41,10 @@ RUN git clone https://github.com/KONAKONA666/q8_kernels.git ...@@ -41,7 +41,10 @@ RUN git clone https://github.com/KONAKONA666/q8_kernels.git
RUN cd q8_kernels && git submodule init && git submodule update && python setup.py install && rm -rf build RUN cd q8_kernels && git submodule init && git submodule update && python setup.py install && rm -rf build
# cloud deploy # cloud deploy
RUN pip install --no-cache-dir aio-pika asyncpg>=0.27.0 aioboto3>=12.0.0 PyJWT alibabacloud_dypnsapi20170525==1.2.2 redis==6.4.0 tos -U RUN pip install --no-cache-dir aio-pika asyncpg>=0.27.0 aioboto3>=12.0.0 PyJWT alibabacloud_dypnsapi20170525==1.2.2 redis==6.4.0 tos
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
ENV PATH=/root/.cargo/bin:$PATH
RUN cd /opt \ RUN cd /opt \
&& wget https://mirrors.tuna.tsinghua.edu.cn/gnu//libiconv/libiconv-1.15.tar.gz \ && wget https://mirrors.tuna.tsinghua.edu.cn/gnu//libiconv/libiconv-1.15.tar.gz \
...@@ -49,10 +52,8 @@ RUN cd /opt \ ...@@ -49,10 +52,8 @@ RUN cd /opt \
&& cd libiconv-1.15 \ && cd libiconv-1.15 \
&& ./configure \ && ./configure \
&& make \ && make \
&& make install && make install \
&& rm -rf /opt/libiconv-1.15
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
ENV PATH=/root/.cargo/bin:$PATH
RUN cd /opt \ RUN cd /opt \
&& git clone https://github.com/GStreamer/gstreamer.git -b 1.24.12 --depth 1 \ && git clone https://github.com/GStreamer/gstreamer.git -b 1.24.12 --depth 1 \
...@@ -60,13 +61,15 @@ RUN cd /opt \ ...@@ -60,13 +61,15 @@ RUN cd /opt \
&& meson setup builddir \ && meson setup builddir \
&& meson compile -C builddir \ && meson compile -C builddir \
&& meson install -C builddir \ && meson install -C builddir \
&& ldconfig && ldconfig \
&& rm -rf /opt/gstreamer
RUN cd /opt \ RUN cd /opt \
&& git clone https://github.com/GStreamer/gst-plugins-rs.git -b gstreamer-1.24.12 --depth 1 \ && git clone https://github.com/GStreamer/gst-plugins-rs.git -b gstreamer-1.24.12 --depth 1 \
&& cd gst-plugins-rs \ && cd gst-plugins-rs \
&& cargo build --package gst-plugin-webrtchttp --release \ && cargo build --package gst-plugin-webrtchttp --release \
&& install -m 644 target/release/libgstwebrtchttp.so $(pkg-config --variable=pluginsdir gstreamer-1.0)/ && install -m 644 target/release/libgstwebrtchttp.so $(pkg-config --variable=pluginsdir gstreamer-1.0)/ \
&& rm -rf /opt/gst-plugins-rs
RUN ldconfig RUN ldconfig
......
FROM lightx2v/lightx2v:25091903-cu128 AS base FROM lightx2v/lightx2v:25092201-cu128 AS base
RUN mkdir /workspace/LightX2V RUN mkdir /workspace/LightX2V
WORKDIR /workspace/LightX2V WORKDIR /workspace/LightX2V
......
...@@ -27,10 +27,10 @@ We strongly recommend using the Docker environment, which is the simplest and fa ...@@ -27,10 +27,10 @@ We strongly recommend using the Docker environment, which is the simplest and fa
#### 1. Pull Image #### 1. Pull Image
Visit LightX2V's [Docker Hub](https://hub.docker.com/r/lightx2v/lightx2v/tags), select a tag with the latest date, such as `25091903-cu128`: Visit LightX2V's [Docker Hub](https://hub.docker.com/r/lightx2v/lightx2v/tags), select a tag with the latest date, such as `25092201-cu128`:
```bash ```bash
docker pull lightx2v/lightx2v:25091903-cu128 docker pull lightx2v/lightx2v:25092201-cu128
``` ```
We recommend using the `cuda128` environment for faster inference speed. If you need to use the `cuda124` environment, you can use image versions with the `-cu124` suffix: We recommend using the `cuda128` environment for faster inference speed. If you need to use the `cuda124` environment, you can use image versions with the `-cu124` suffix:
...@@ -51,7 +51,7 @@ For mainland China, if the network is unstable when pulling images, you can pull ...@@ -51,7 +51,7 @@ For mainland China, if the network is unstable when pulling images, you can pull
```bash ```bash
# cuda128 # cuda128
docker pull registry.cn-hangzhou.aliyuncs.com/yongyang/lightx2v:25091903-cu128 docker pull registry.cn-hangzhou.aliyuncs.com/yongyang/lightx2v:25092201-cu128
# cuda124 # cuda124
docker pull registry.cn-hangzhou.aliyuncs.com/yongyang/lightx2v:25091903-cu124 docker pull registry.cn-hangzhou.aliyuncs.com/yongyang/lightx2v:25091903-cu124
......
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
#### 1. 拉取镜像 #### 1. 拉取镜像
访问 LightX2V 的 [Docker Hub](https://hub.docker.com/r/lightx2v/lightx2v/tags),选择一个最新日期的 tag,比如 `25091903-cu128` 访问 LightX2V 的 [Docker Hub](https://hub.docker.com/r/lightx2v/lightx2v/tags),选择一个最新日期的 tag,比如 `25092201-cu128`
```bash ```bash
docker pull lightx2v/lightx2v:25091903-cu128 docker pull lightx2v/lightx2v:25092201-cu128
``` ```
我们推荐使用`cuda128`环境,以获得更快的推理速度,若需要使用`cuda124`环境,可以使用带`-cu124`后缀的镜像版本: 我们推荐使用`cuda128`环境,以获得更快的推理速度,若需要使用`cuda124`环境,可以使用带`-cu124`后缀的镜像版本:
...@@ -51,7 +51,7 @@ docker run --gpus all -itd --ipc=host --name [容器名] -v [挂载设置] --ent ...@@ -51,7 +51,7 @@ docker run --gpus all -itd --ipc=host --name [容器名] -v [挂载设置] --ent
```bash ```bash
# cuda128 # cuda128
docker pull registry.cn-hangzhou.aliyuncs.com/yongyang/lightx2v:25091903-cu128 docker pull registry.cn-hangzhou.aliyuncs.com/yongyang/lightx2v:25092201-cu128
# cuda124 # cuda124
docker pull registry.cn-hangzhou.aliyuncs.com/yongyang/lightx2v:25091903-cu124 docker pull registry.cn-hangzhou.aliyuncs.com/yongyang/lightx2v:25091903-cu124
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment