Meta Byte Track
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. FROM nvcr.io/nvidia/tensorrt:21.09-py3
  2. ENV DEBIAN_FRONTEND=noninteractive
  3. ARG USERNAME=user
  4. ARG WORKDIR=/workspace/ByteTrack
  5. RUN apt-get update && apt-get install -y \
  6. automake autoconf libpng-dev nano python3-pip \
  7. curl zip unzip libtool swig zlib1g-dev pkg-config \
  8. python3-mock libpython3-dev libpython3-all-dev \
  9. g++ gcc cmake make pciutils cpio gosu wget \
  10. libgtk-3-dev libxtst-dev sudo apt-transport-https \
  11. build-essential gnupg git xz-utils vim \
  12. libva-drm2 libva-x11-2 vainfo libva-wayland2 libva-glx2 \
  13. libva-dev libdrm-dev xorg xorg-dev protobuf-compiler \
  14. openbox libx11-dev libgl1-mesa-glx libgl1-mesa-dev \
  15. libtbb2 libtbb-dev libopenblas-dev libopenmpi-dev \
  16. && sed -i 's/# set linenumbers/set linenumbers/g' /etc/nanorc \
  17. && apt clean \
  18. && rm -rf /var/lib/apt/lists/*
  19. RUN git clone https://github.com/ifzhang/ByteTrack \
  20. && cd ByteTrack \
  21. && git checkout 3434c5e8bc6a5ae8ad530528ba8d9a431967f237 \
  22. && mkdir -p YOLOX_outputs/yolox_x_mix_det/track_vis \
  23. && sed -i 's/torch>=1.7/torch==1.9.1+cu111/g' requirements.txt \
  24. && sed -i 's/torchvision==0.10.0/torchvision==0.10.1+cu111/g' requirements.txt \
  25. && sed -i "s/'cuda'/0/g" tools/demo_track.py \
  26. && pip3 install pip --upgrade \
  27. && pip3 install -r requirements.txt -f https://download.pytorch.org/whl/torch_stable.html \
  28. && python3 setup.py develop \
  29. && pip3 install cython \
  30. && pip3 install 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI' \
  31. && pip3 install cython_bbox gdown \
  32. && ldconfig \
  33. && pip cache purge
  34. RUN git clone https://github.com/NVIDIA-AI-IOT/torch2trt \
  35. && cd torch2trt \
  36. && git checkout 0400b38123d01cc845364870bdf0a0044ea2b3b2 \
  37. # https://github.com/NVIDIA-AI-IOT/torch2trt/issues/619
  38. && wget https://github.com/NVIDIA-AI-IOT/torch2trt/commit/8b9fb46ddbe99c2ddf3f1ed148c97435cbeb8fd3.patch \
  39. && git apply 8b9fb46ddbe99c2ddf3f1ed148c97435cbeb8fd3.patch \
  40. && python3 setup.py install
  41. RUN echo "root:root" | chpasswd \
  42. && adduser --disabled-password --gecos "" "${USERNAME}" \
  43. && echo "${USERNAME}:${USERNAME}" | chpasswd \
  44. && echo "%${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/${USERNAME} \
  45. && chmod 0440 /etc/sudoers.d/${USERNAME}
  46. USER ${USERNAME}
  47. RUN sudo chown -R ${USERNAME}:${USERNAME} ${WORKDIR}
  48. WORKDIR ${WORKDIR}