Update Dockerfile and dependencies, add installation guide

- Switched base image in `Dockerfile` to `nvidia/cuda:12.6.2-cudnn-devel-ubuntu22.04`.
- Added non-interactive mode for Debian and streamlined package installation.
- Removed unused JSON library build steps.
- Enhanced ROS2 installation with keyring and repository setup.
- Simplified Python package and framework dependencies installation.
- Added commands for `git-lfs` installation and cloning `rbs_assets_library`.
- Introduced a new Russian installation guide (`doc/ru/installation.md`) with detailed steps for setting up the framework and dependencies.
- Fixed import paths in `octree.py` for consistency with project structure.
- Added `all-deps.repos` and `requirements.txt` for managing dependencies.
This commit is contained in:
Ilya Uraev 2024-11-20 21:07:19 +03:00
parent 17401c29a7
commit a8874fa0d7
5 changed files with 143 additions and 26 deletions

View file

@ -1,46 +1,65 @@
FROM billf1nger/ros2-humble-cuda:v12.2.2-cudnn8-ubuntu22.04-gz-nvidia
FROM nvidia/cuda:12.6.2-cudnn-devel-ubuntu22.04
ARG WSDIR=rbs_ws
ARG config_type=sim
ENV RBS_ASSEMBLY_DIR=/assembly
ENV DEBIAN_FRONTEND=noninteractive
# COPY /home/bill-finger/assembly /assembly
ENV IGN_GAZEBO_RESOURCE_PATH=/${WSDIR}/install/rbs_simulation/share/rbs_simulation/
RUN apt update && apt install -y \
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
git \
software-properties-common \
python3-pip \
lsb-release \
wget \
gnupg
curl \
wget
RUN pip install vcstool
WORKDIR /libs
RUN wget https://github.com/nlohmann/json/archive/refs/tags/v3.11.3.tar.gz &&\
tar -xf v3.11.3.tar.gz &&\
cd json-3.11.3 &&\
mkdir build &&\
cd build &&\
cmake .. &&\
make &&\
make install
# WORKDIR /libs
# RUN wget https://github.com/nlohmann/json/archive/refs/tags/v3.11.3.tar.gz &&\
# tar -xf v3.11.3.tar.gz &&\
# cd json-3.11.3 &&\
# mkdir build &&\
# cd build &&\
# cmake .. &&\
# make &&\
# make install
RUN git clone https://gitlab.com/robossembler/forks/megapose6d.git &&\
cd megapose6d &&\
pip install bokeh joblib pin torch transforms3d webdataset omegaconf tqdm &&\
pip install -e .
RUN git clone https://github.com/thodan/bop_toolkit &&\
cd bop_toolkit &&\
pip install -e .
RUN add-apt-repository universe
RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null
RUN apt-get update && apt-get upgrade && apt-get install -y ros-humble-ros-base
# RUN git clone https://gitlab.com/robossembler/forks/megapose6d.git &&\
# cd megapose6d &&\
# pip install bokeh joblib pin torch transforms3d webdataset omegaconf tqdm &&\
# pip install -e .
# RUN git clone https://github.com/thodan/bop_toolkit &&\
# cd bop_toolkit &&\
# pip install -e .
WORKDIR /${WSDIR}
COPY . src/robossembler-ros2/
RUN vcs import src/. < src/robossembler-ros2/rbs.${config_type}.repos
RUN apt update && rosdep update && \
RUN pip install vcstool uv
# Install framework and dependencies
RUN vcs import src/. < src/robossembler-ros2/repos/all-deps.repos
RUN uv pip install --system -r src/robossembler-ros2/repos/requirements.txt
RUN apt-get update && rosdep update && \
rosdep install -y -r -q --from-paths src --ignore-src --rosdistro humble
RUN . /opt/ros/humble/setup.sh && \
colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=1
WORKDIR /${RBS_ASSEMBLY_DIR}
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
RUN apt-get install git-lfs
RUN git clone https://github.com/solid-sinusoid/rbs_assets_library.git
RUN cd rbs_assets_library && git lfs pull && pip install -e .
WORKDIR /${WSDIR}