Skip to content
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

I had find a workable Dockerfile to run the demo, FYI #59

Closed
nxdong opened this issue Feb 19, 2024 · 3 comments
Closed

I had find a workable Dockerfile to run the demo, FYI #59

nxdong opened this issue Feb 19, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@nxdong
Copy link

nxdong commented Feb 19, 2024

Dockerfile Content

assume file save in ./docker/Dockerfile

FROM nvidia/cuda:11.8.0-devel-ubuntu22.04

RUN apt-get update && apt-get install -y software-properties-common && rm -rf /var/lib/apt/lists/*
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt-get update && apt-get install -y --no-install-recommends \
    libcurl4-openssl-dev \
    wget \
    vim \
    zlib1g-dev \
    git \
    pkg-config \
    sudo \
    ssh \
    libssl-dev \
    pbzip2 \
    pv \
    bzip2 \
    unzip \
    devscripts \
    lintian \
    fakeroot \
    dh-make \
    libgl1-mesa-glx \
    python3 \
    python3-pip \
    python3-dev \
    python3-wheel \
    gcc \
    g++ \
    && cd /usr/local/bin \
    && ln -s /usr/bin/python3 python \
    && ln -s /usr/bin/pip3 pip \
    && rm -rf /var/lib/apt/lists/*

RUN pip install --upgrade pip
RUN pip install torch torchvision torchaudio --no-cache-dir --index-url https://download.pytorch.org/whl/cu118
ENV FORCE_CUDA="1"
ENV MMCV_WITH_OPS=1
RUN pip install gradio --no-cache-dir -i  https://pypi.tuna.tsinghua.edu.cn/simple

Build Scripts

docker build -f ./docker/Dockerfile -t yolo_world:0.1 .

Run Demo

# start container in code dir
docker run -it --runtime=nvidia -p 8080:8080 -v ${PWD}:${PWD} -w ${PWD} yolo_world:0.1 bash
# install deps
pip3 install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple
# download pretrain model

# start demo
python3 ./demo.py ./configs/pretrain/yolo_world_m_dual_vlpan_l2norm_2e-3_100e_4x8gpus_obj365v1_goldg_train_lvis_minival.py  ./model/yolo_world_m_clip_base_dual_vlpan_2e-3adamw_32xb16_100e_o365_goldg_train_pretrained-2b7bd1be.pth 

visit web

http://0.0.0.0:8080/

@wondervictor
Copy link
Collaborator

Hi @nxdong, it's a great feature! A pull request is welcomed!

@jradikk
Copy link
Contributor

jradikk commented Feb 20, 2024

I can optimize the Dockerfile and create a PR in a day or so. Thanks for sharing it @nxdong

@wondervictor wondervictor added the enhancement New feature or request label Feb 20, 2024
@jradikk jradikk mentioned this issue Feb 26, 2024
@wondervictor
Copy link
Collaborator

This issue will be closed since there is no further update related to the main topic. Thanks for your interest. If you have any questions about YOLO-World in the future, you're welcome to open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants