-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.x86.noetic.pytorch
106 lines (77 loc) · 3.73 KB
/
Dockerfile.x86.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
FROM ros:noetic
# 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 curl
# install opencv
RUN apt install -y libopencv-dev python3-opencv
RUN mkdir ws
RUN cd ws
# install pytorch and torchvision
RUN apt install -y python3-pip libopenblas-base libopenmpi-dev libomp-dev
RUN pip3 install torch==1.10.0+cu111 torchvision==0.11.0+cu111 torchaudio==0.10.0 -f https://download.pytorch.org/whl/torch_stable.html
RUN pip3 install Cython
RUN pip3 install numpy torch-1.10.0-cp38-cp38-linux_x86_64.whl
# install sauvc dependencies
# changed for x86_64
RUN ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py38.so /usr/lib/x86_64-linux-gnu/libboost_python36.so
RUN ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py38.a /usr/lib/x86_64-linux-gnu/libboost_python36.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"
# 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 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 update
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
# isolated building
RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && cd /ws/additional_packages_ws && catkin_make --only-pkg-with-deps rosnode"
# stingray dependencies
RUN sudo apt-get install -y ros-noetic-serial ros-noetic-usb-cam ros-noetic-rosbridge-server ros-noetic-image-view ros-noetic-actionlib
RUN sudo apt-get install -y ros-noetic-zbar-ros
# gazebo installation
RUN sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
RUN wget https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
RUN sudo apt-get update
RUN sudo apt-get install gazebo11 -y
RUN sudo apt-get install -y ros-noetic-gazebo-ros-pkgs ros-noetic-gazebo-ros-control
RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && cd /sauvc && catkin_make && source devel/setup.bash"
#
# setup entrypoint
#
COPY ./sauvc /sauvc
COPY ./packages/autostart_sauvc_entrypoint.sh /autostart_sauvc_entrypoint.sh
RUN echo 'source /ws/additional_packages_ws/devel/setup.bash' >> /root/.bashrc
ENTRYPOINT ["/autostart_sauvc_entrypoint.sh"]
CMD ["bash"]
WORKDIR /