-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.tx2.noetic.pytorch
82 lines (69 loc) · 3.17 KB
/
Dockerfile.tx2.noetic.pytorch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
FROM dustynv/ros:noetic-ros-base-l4t-r32.6.1
# nvidia-container-runtime
# ENV NVIDIA_VISIBLE_DEVICES \
# ${NVIDIA_VISIBLE_DEVICES:-all}
# ENV NVIDIA_DRIVER_CAPABILITIES \
# ${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics
RUN apt update
RUN apt install -y --no-install-recommends git wget
# install opencv
RUN apt install -y libopencv-dev python3-opencv
RUN mkdir ws
RUN cd ws
# install pytorch
RUN wget https://nvidia.box.com/shared/static/fjtbno0vpo676a25cgvuqc1wty0fkkg6.whl -O torch-1.10.0-cp36-cp36m-linux_aarch64.whl
RUN apt install -y python3-pip libopenblas-base libopenmpi-dev libomp-dev
RUN pip3 install Cython
RUN pip3 install numpy torch-1.10.0-cp36-cp36m-linux_aarch64.whl
# install torchvision
RUN apt install -y libjpeg-dev zlib1g-dev libpython3-dev libavcodec-dev libavformat-dev libswscale-dev
RUN git clone --branch v0.11.1 https://github.com/pytorch/vision torchvision
WORKDIR /torchvision
RUN export BUILD_VERSION=0.11.1
RUN python3 setup.py install --user
# install sauvc dependencies
RUN ln -s /usr/lib/aarch64-linux-gnu/libboost_python-py36.so /usr/lib/aarch64-linux-gnu/libboost_python37.so
RUN ln -s /usr/lib/aarch64-linux-gnu/libboost_python-py36.a /usr/lib/aarch64-linux-gnu/libboost_python37.a
RUN pip3 install "numpy>=1.18.5,<1.20"
RUN pip3 install tqdm
RUN pip3 install pandas==1.1.0
RUN apt-get install -y python3-requests build-essential libatlas-base-dev gfortran libfreetype6-dev
RUN pip3 install scipy
RUN pip3 uninstall -y pillow
RUN pip3 install "pillow<7"
RUN pip3 install seaborn
RUN pip3 install "matplotlib>=3.2.2,<4"
RUN mkdir -p /ws/additional_packages_ws/src
WORKDIR /ws/additional_packages_ws/src
RUN git clone https://github.com/ros-perception/vision_opencv.git
RUN git clone https://github.com/ros/executive_smach.git
RUN git clone https://github.com/ros-perception/image_common.git
RUN git clone https://github.com/ros-drivers/usb_cam.git
RUN git clone https://github.com/ros-visualization/executive_smach_visualization.git
RUN git clone https://github.com/ros/actionlib.git
RUN git clone https://github.com/ros-drivers/video_stream_opencv.git
RUN git clone https://github.com/ros-perception/image_pipeline.git
RUN mv image_pipeline/image_view/ .
RUN rm -r image_pipeline/
RUN git clone https://github.com/ros/roslint.git
RUN apt-get install -y libyaml-cpp-dev graphviz-dev zbar-tools
RUN pip3 install pygraphviz transitions
RUN apt-get install -y libzbar-dev
RUN git clone -b melodic-devel https://github.com/ros-drivers/zbar_ros.git
RUN git clone -b ros1-releases https://github.com/fkie/async_web_server_cpp.git
RUN git clone -b master https://github.com/RobotWebTools/web_video_server.git
RUN git clone https://github.com/wjwwood/serial.git
RUN git clone -b melodic-devel https://github.com/ros/ros_comm.git
# deep sort dependencies
RUN pip3 install filterpy==1.4.5
RUN pip3 install scikit-image==0.17.2
RUN pip3 install lap==0.4.0
RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && cd /ws/additional_packages_ws && catkin_make"
#
# setup entrypoint
#
COPY ./packages/sauvc_entrypoint.sh /sauvc_entrypoint.sh
RUN echo 'source /ws/additional_packages_ws/devel/setup.bash' >> /root/.bashrc
ENTRYPOINT ["/sauvc_entrypoint.sh"]
CMD ["bash"]
WORKDIR /