-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from OCRTOC/release_v1.3
Release v1.3
- Loading branch information
Showing
8 changed files
with
119 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
from nvidia/cudagl:10.2-devel-ubuntu18.04 | ||
|
||
ENV TZ=Asia/Shanghai | ||
ENV NVIDIA_VISIBLE_DEVICES all | ||
ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute | ||
|
||
# Install Ubuntu tools. | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \ | ||
&& rm /etc/apt/sources.list.d/cuda.list \ | ||
&& rm /etc/apt/sources.list.d/nvidia-ml.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y lsb-release psmisc tree vim net-tools iputils-ping wget git python3-pip libglm-dev \ | ||
# Install gl/x package for visualization inside docker | ||
&& apt-get install -y libglvnd0 libgl1 libglx0 libegl1 libxext6 libx11-6 | ||
|
||
# Install ROS. | ||
SHELL ["/bin/bash", "-c"] | ||
RUN sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list' \ | ||
&& apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 \ | ||
&& apt update \ | ||
&& apt install -y ros-melodic-desktop-full \ | ||
&& echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc \ | ||
&& source ~/.bashrc \ | ||
&& apt install -y python-rosdep \ | ||
&& echo "151.101.84.133 raw.githubusercontent.com" >> /etc/hosts \ | ||
&& rosdep init \ | ||
&& rosdep update | ||
|
||
# Upgrade Gazebo. | ||
RUN sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' \ | ||
&& wget https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - \ | ||
&& apt-get update \ | ||
&& apt-get install -y gazebo9 \ | ||
&& apt upgrade -y libignition-math4 | ||
|
||
# Install ROS dependencies. | ||
RUN pip3 install catkin_pkg numpy transforms3d rospkg \ | ||
&& apt-get install -y ros-melodic-ddynamic-reconfigure \ | ||
ros-melodic-gripper-action-controller \ | ||
ros-melodic-joint-trajectory-controller \ | ||
ros-melodic-industrial-robot-status-interface \ | ||
ros-melodic-moveit \ | ||
ros-melodic-ros-control \ | ||
ros-melodic-ros-controllers \ | ||
ros-melodic-ur-msgs | ||
|
||
# Copy files. | ||
COPY ocrtoc_materials /root/ocrtoc_materials | ||
COPY workspace /workspace | ||
|
||
# Install Sapien. | ||
RUN wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - \ | ||
&& wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.2.148-bionic.list https://packages.lunarg.com/vulkan/1.2.148/lunarg-vulkan-1.2.148-bionic.list \ | ||
&& apt update \ | ||
&& apt install -y vulkan-sdk libglew-dev \ | ||
&& cd /workspace/glfw \ | ||
&& mkdir build && cd build && cmake .. && make install \ | ||
&& cd /workspace/spdlog \ | ||
&& mkdir build && cd build && cmake .. && make install \ | ||
&& cd /workspace/sapien \ | ||
&& source /opt/ros/melodic/setup.bash \ | ||
&& mkdir build && cd build && cmake .. && make pysapien_ros1 | ||
|
||
# Others. | ||
RUN cd /root \ | ||
&& mkdir -p ocrtoc_ws/src \ | ||
&& cd ocrtoc_ws \ | ||
&& source /opt/ros/melodic/setup.bash \ | ||
&& catkin_make \ | ||
&& echo "source /root/ocrtoc_ws/devel/setup.bash" >> ~/.bashrc \ | ||
&& rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
OSS_BUCKET_DOMAIN="https://ocrtoc-public.oss-cn-hangzhou.aliyuncs.com" | ||
# Other option. | ||
# OSS_BUCKET_DOMAIN="https://ocrtoc-public.oss-accelerate.aliyuncs.com" | ||
|
||
echo "Downloading ocrtoc_materials..." | ||
mkdir -p ocrtoc_materials | ||
cd ocrtoc_materials | ||
wget ${OSS_BUCKET_DOMAIN}/ocrtoc_materials/models.tar.gz | ||
tar -zxvf models.tar.gz | ||
rm -rf models.tar.gz | ||
wget ${OSS_BUCKET_DOMAIN}/ocrtoc_materials/scenes.tar.gz | ||
tar -zxvf scenes.tar.gz | ||
rm -rf scenes.tar.gz | ||
wget ${OSS_BUCKET_DOMAIN}/ocrtoc_materials/objects.csv | ||
|
||
echo "Downloading sapien files..." | ||
cd .. | ||
wget ${OSS_BUCKET_DOMAIN}/sapien.tar.gz | ||
tar -zxvf sapien.tar.gz | ||
rm -rf sapien.tar.gz | ||
|
||
echo "Build image." | ||
docker build -t you_docker_image:tag_name . | ||
|
||
echo "Done." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.