Open2

BoIR (PoseEstimation) の環境構築

PINTOPINTO

https://github.com/uyoung-jeong/BoIR

Dockerfile
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
    && apt-get upgrade -y \
    && apt-get install -y \
        software-properties-common \
    && add-apt-repository ppa:deadsnakes/ppa \
    && apt-get install -y \
        python3.9 \
        python3.9-venv \
    && update-alternatives \
        --install /usr/bin/python python /usr/bin/python3.9 130 \
    && apt-get install -y \
        nano \
        wget \
        curl \
        sudo \
        git \
        build-essential \
        libssl-dev \
        libffi-dev \
        python3.9-dev \
        libgl1-mesa-dev \
    && apt clean \
    && rm -rf /var/lib/apt/lists/* \
    && sed -i 's/# set linenumbers/set linenumbers/g' /etc/nanorc \
    && curl -kL https://bootstrap.pypa.io/get-pip.py | python \
    && pip install pip -U \
    && pip install \
        numpy==1.23.2 \
        matplotlib==3.4.1 \
        opencv-python==4.5.2.52 \
        pycocotools==2.0.6 \
        scikit-image==0.18.2 \
        scipy==1.9.0 \
        tensorboard==2.5.0 \
        protobuf==3.20.* \
        tqdm==4.60.0 \
        yacs==0.1.8 \
        einops==0.3.0 \
        Cython==3.0.4 \
        onnx==1.14.1 \
        onnxruntime==1.16.1 \
        onnxsim==0.4.33 \
    && pip install torch torchvision torchaudio \
        --index-url https://download.pytorch.org/whl/cpu

ENV USERNAME=user
RUN echo "root:root" | chpasswd \
    && adduser --disabled-password --gecos "" "${USERNAME}" \
    && echo "${USERNAME}:${USERNAME}" | chpasswd \
    && echo "%${USERNAME}    ALL=(ALL)   NOPASSWD:    ALL" >> /etc/sudoers.d/${USERNAME} \
    && chmod 0440 /etc/sudoers.d/${USERNAME}
USER ${USERNAME}
ARG WKDIR=/workdir
WORKDIR ${WKDIR}
RUN sudo chown ${USERNAME}:${USERNAME} ${WKDIR}

RUN git clone https://github.com/uyoung-jeong/CrowdPose.git \
    && cd CrowdPose/crowdpose-api/PythonAPI \
    && python setup.py install --user
PINTOPINTO
git clone https://github.com/uyoung-jeong/BoIR.git \
&& cd BoIR \
&& git checkout 09481f7cace6e6acf7855fde5c68d5cc6deae7e8

docker run --rm -it -v `pwd`:/workdir pinto0309/boir:latest