From a4f357eba46e827ef041128b01d64c048e9c21fb Mon Sep 17 00:00:00 2001 From: kamiradi Date: Thu, 13 Mar 2025 18:17:14 +0000 Subject: [PATCH 1/3] dockerization --- .docker/Dockerfile | 58 +++++++++++++++++++++++++++++++++++++++++++++ .gitmodules | 10 ++++---- docker-compose.yaml | 27 +++++++++++++++++++++ 3 files changed, 90 insertions(+), 5 deletions(-) create mode 100644 .docker/Dockerfile create mode 100644 docker-compose.yaml diff --git a/.docker/Dockerfile b/.docker/Dockerfile new file mode 100644 index 0000000..8740a66 --- /dev/null +++ b/.docker/Dockerfile @@ -0,0 +1,58 @@ +FROM robotlocomotion/drake:1.35.0 +LABEL Aditya Kamireddypalli "kamireddypalliaditya@gmail.com" + +ENV WORKSPACE /root/workspace + +# build essentials +RUN apt update && \ + apt install -y curl build-essential git && \ + apt install -y libssl-dev zlib1g-dev \ + libbz2-dev libreadline-dev libsqlite3-dev curl git \ + libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev \ + liblzma-dev && \ + apt install -y software-properties-common libtbb-dev && \ + apt install -y libeigen3-dev python3.10-venv ffmpeg \ + clangd-12 wget lsb-release cmake libboost-all-dev gdb python3-dbg && \ + update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-12 100 + +# build gtsam +# RUN git clone https://github.com/borglab/gtsam.git && \ +# cd gtsam && \ +# pip install -r python/dev_requirements.txt && \ +# mkdir build && cd build && \ +# cmake .. -DGTSAM_USE_SYSTEM_EIGEN=ON -DGTSAM_BUILD_PYTHON=1 && \ +# make check && \ +# make install && \ +# make python-install + +# python management just in case +# RUN git clone https://github.com/pyenv/pyenv.git /pyenv +# ENV PYENV_ROOT /pyenv + + +RUN curl https://pyenv.run | bash +ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:$PATH" + +RUN curl -sSL https://install.python-poetry.org | python3 - +ENV PATH="/root/.local/bin:$PATH" + +RUN pyenv global system && \ + pyenv install 3.10.12 && \ + # pip3 install jupyterlab && \ + # pip3 install jupyterlab-vim && \ + # pip3 install neopyter && \ + # pip3 install nbdev && \ + # pip3 install open3d && \ + # echo "export PATH="/opt/drake/bin${PATH:+:${PATH}}"" >> ~/.bashrc && \ + # echo "export PYTHONPATH="/opt/drake/lib/python$(python3 -c 'import sys; \ + # print("{0}.{1}".format(*sys.version_info))')/site-packages${PYTHONPATH:+:${PYTHONPATH}}"" >> ~/.bashrc && \ + # echo "export PATH="$PYENV_ROOT/bin:$PATH"" && \ + # echo "eval "$(pyenv init --path)"" && \ + # echo "eval "$(pyenv init -)"" + echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc && \ + echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc && \ + echo 'eval "$(pyenv init - bash)"' >> ~/.bashrc + + + +WORKDIR $WORKSPACE diff --git a/.gitmodules b/.gitmodules index dc55c54..621ec6d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,16 +1,16 @@ [submodule "scalable_real2sim/robot_payload_id"] path = scalable_real2sim/robot_payload_id - url = git@github.com:nepfaff/robot_payload_id.git + url = https://github.com/nepfaff/robot_payload_id.git [submodule "scalable_real2sim/neuralangelo"] path = scalable_real2sim/neuralangelo - url = git@github.com:evelyn-fu/neuralangelo.git + url = https://github.com/evelyn-fu/neuralangelo.git branch = object_masking [submodule "scalable_real2sim/Frosting"] path = scalable_real2sim/Frosting - url = git@github.com:nepfaff/Frosting.git + url = https://github.com/nepfaff/Frosting.git [submodule "scalable_real2sim/BundleSDF"] path = scalable_real2sim/BundleSDF - url = git@github.com:nepfaff/BundleSDF.git + url = https://github.com/nepfaff/BundleSDF.git [submodule "scalable_real2sim/pickplace_data_collection"] path = scalable_real2sim/pickplace_data_collection - url = git@github.com:evelyn-fu/pickplace_data_collection.git + url = https://github.com/evelyn-fu/pickplace_data_collection.git diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..8c4c9ae --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,27 @@ +services: + real2sim_drake: + image: real2sim_drake + container_name: real2sim_drake + build: + context: . + dockerfile: .docker/Dockerfile + environment: + - DISPLAY=${DISPLAY} + - QT_X11_NO_MITSHM=1 + - TERM=xterm-256-color + volumes: + - /tmp/.X11-unix:/tml/.X11-unix:rw + - ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority + - ./:/root/workspace/ + - /home/$(whoami)/.ssh:/root/.ssh + tty: true + stdin_open: true + network_mode: "host" + privileged: true + ulimits: + rtprio: 70 + rttime: -1 + memlock: 8428281856 + devices: + - "/dev:/dev" + command: /bin/bash From aa0c7dc314fe18b2df37b5f89955c33f1191c8a9 Mon Sep 17 00:00:00 2001 From: kamiradi Date: Thu, 13 Mar 2025 18:24:35 +0000 Subject: [PATCH 2/3] remove personal details --- .docker/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 8740a66..bc57628 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,5 +1,4 @@ FROM robotlocomotion/drake:1.35.0 -LABEL Aditya Kamireddypalli "kamireddypalliaditya@gmail.com" ENV WORKSPACE /root/workspace From b562caaf3182c8c5a7f0749b0f9deb6d54fcc0e8 Mon Sep 17 00:00:00 2001 From: kamiradi Date: Thu, 13 Mar 2025 18:25:50 +0000 Subject: [PATCH 3/3] remove comments --- .docker/Dockerfile | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index bc57628..212bfda 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -14,21 +14,6 @@ RUN apt update && \ clangd-12 wget lsb-release cmake libboost-all-dev gdb python3-dbg && \ update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-12 100 -# build gtsam -# RUN git clone https://github.com/borglab/gtsam.git && \ -# cd gtsam && \ -# pip install -r python/dev_requirements.txt && \ -# mkdir build && cd build && \ -# cmake .. -DGTSAM_USE_SYSTEM_EIGEN=ON -DGTSAM_BUILD_PYTHON=1 && \ -# make check && \ -# make install && \ -# make python-install - -# python management just in case -# RUN git clone https://github.com/pyenv/pyenv.git /pyenv -# ENV PYENV_ROOT /pyenv - - RUN curl https://pyenv.run | bash ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:$PATH" @@ -37,17 +22,6 @@ ENV PATH="/root/.local/bin:$PATH" RUN pyenv global system && \ pyenv install 3.10.12 && \ - # pip3 install jupyterlab && \ - # pip3 install jupyterlab-vim && \ - # pip3 install neopyter && \ - # pip3 install nbdev && \ - # pip3 install open3d && \ - # echo "export PATH="/opt/drake/bin${PATH:+:${PATH}}"" >> ~/.bashrc && \ - # echo "export PYTHONPATH="/opt/drake/lib/python$(python3 -c 'import sys; \ - # print("{0}.{1}".format(*sys.version_info))')/site-packages${PYTHONPATH:+:${PYTHONPATH}}"" >> ~/.bashrc && \ - # echo "export PATH="$PYENV_ROOT/bin:$PATH"" && \ - # echo "eval "$(pyenv init --path)"" && \ - # echo "eval "$(pyenv init -)"" echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc && \ echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc && \ echo 'eval "$(pyenv init - bash)"' >> ~/.bashrc