Skip to content

Commit c5fc712

Browse files
Saurav AgarwalSaurav Agarwal
authored andcommitted
update docker setup
1 parent 20305ee commit c5fc712

File tree

9 files changed

+28
-18
lines changed

9 files changed

+28
-18
lines changed

doc/manual/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ The base image is `agarwalsaurav/pytorch_base` with different tags for different
8888
|`noble-torch2.5.1-cuda12.6.2-jazzy` | `--with-ros --with-cuda --noble`|
8989
|`noble-torch2.5.1-cuda12.6.2` | `--with-cuda --noble`|
9090
|`noble-torch2.5.1-jazzy` | `--with-ros --noble`|
91-
|`noble-torch2.5.1` | --noble|
91+
|`noble-torch2.5.1` | `--noble`|
9292

9393

9494
Install the library available on PyPI:

doc/manual/quick_start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ env.PlotSystemMap("final_map");
8181
```
8282

8383

84-
See \ref python/coverage_env/coverage_simple.py and \ref python/coverage_env/coverage_class.py for complete examples.
84+
See \ref python/system_env/coverage_simple.py and \ref python/system_env/coverage_class.py for complete examples.
8585

8686
---
8787

utils/docker/base_images/.bashrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,4 @@ export EDITOR="$VISUAL"
130130
export LC_ALL=C.UTF-8
131131
export LANG=C.UTF-8
132132
export PYTHONPATH=/opt/venv/lib/python3.11/site-packages:$PYTHONPATH
133+
source /opt/venv/bin/activate

utils/docker/base_images/build_all_images.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ fi
1414
build_image() {
1515
echo "Building image $2"
1616
TAG_NAME=$2
17-
ALL_BUILD_ARGS="--build-arg CUDA_VERSION=${CUDA_VERSION} --build-arg PYTHON_VERSION=${PYTHON_VERSION} --build-arg PYTORCH_VERSION=${PYTORCH_VERSION}"
17+
ALL_BUILD_ARGS="--no-cache --build-arg CUDA_VERSION=${CUDA_VERSION} --build-arg PYTHON_VERSION=${PYTHON_VERSION} --build-arg PYTORCH_VERSION=${PYTORCH_VERSION}"
1818
echo "docker buildx build ${ALL_BUILD_ARGS} -t ${1}:${TAG_NAME} -f $3 ."
1919
docker buildx build --push ${ALL_BUILD_ARGS} -t ${1}:${TAG_NAME} -f $3 .
20+
if [ $? -ne 0 ]; then
21+
echo "Failed to build image $2"
22+
exit 1
23+
fi
2024
}
2125

2226
CUDA_VERSION="12.4.1"

utils/docker/base_images/ubuntu22.04/Dockerfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@ RUN apt-get -y update; \
2626
curl \
2727
gdb \
2828
software-properties-common \
29-
ca-certificates \
30-
python${PYTHON_VERSION} \
31-
python${PYTHON_VERSION}-dev \
32-
python${PYTHON_VERSION}-venv \
33-
python-is-python3
29+
ca-certificates
30+
31+
RUN add-apt-repository -y ppa:deadsnakes/ppa; \
32+
apt-get -y update; \
33+
apt-get -y install \
34+
python${PYTHON_VERSION} \
35+
python${PYTHON_VERSION}-dev \
36+
python${PYTHON_VERSION}-venv
3437

3538
# Add repo for installing latest version of cmake
3639
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null; \
@@ -68,7 +71,6 @@ RUN mkdir download; \
6871
unzip download/libtorch.zip -d /opt/; \
6972
rm -r download
7073

71-
RUN echo "LD_LIBRARY_PATH=/usr/local/lib:/opt/libtorch/lib:${LD_LIBRARY_PATH}" >> /etc/environment
7274
ENV Torch_DIR=/opt/libtorch/share/cmake/
7375

7476
COPY requirements_cpu.txt /opt/requirements.txt
@@ -78,4 +80,4 @@ RUN /opt/venv/bin/pip install --no-cache-dir -r /opt/requirements.txt
7880
ENV VENV_PATH=/opt/venv
7981

8082
COPY .bashrc /root/.bashrc
81-
RUN echo "source /opt/venv/bin/activate" >> /root/.bashrc
83+
RUN echo 'LD_LIBRARY_PATH=/usr/local/lib:/opt/libtorch/lib:${LD_LIBRARY_PATH}' >> /root/.bashrc

utils/docker/base_images/ubuntu22.04/cuda-ros2.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ COPY requirements.txt /opt/requirements.txt
8181
RUN python${PYTHON_VERSION} -m venv /opt/venv
8282
RUN /opt/venv/bin/pip install --no-cache-dir wheel
8383
RUN /opt/venv/bin/pip install --no-cache-dir -r /opt/requirements.txt
84-
RUN /opt/venv/bin/pip install --no-cache-dir catkin_pkg empy==3.3.4 lark
84+
RUN /opt/venv/bin/pip install --no-cache-dir catkin_pkg empy==3.3.4 lark tomli
8585
ENV VENV_PATH=/opt/venv
8686

8787
COPY .ros.humble.bashrc /root/.bashrc

utils/docker/base_images/ubuntu22.04/cuda.Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu22.04 AS base
44
SHELL ["/bin/bash", "-c"]
55
ENV DEBIAN_FRONTEND=noninteractive
66

7-
ARG PYTHON_VERSION="3.10"
7+
ARG PYTHON_VERSION="3.11"
88
ARG PYTORCH_VERSION="2.5.1"
99

1010
ENV PYTHON_VERSION=${PYTHON_VERSION}
@@ -28,11 +28,14 @@ RUN apt-get -y update; \
2828
curl \
2929
gdb \
3030
software-properties-common \
31-
ca-certificates \
31+
ca-certificates
32+
33+
RUN add-apt-repository -y ppa:deadsnakes/ppa; \
34+
apt-get -y update; \
35+
apt-get -y install \
3236
python${PYTHON_VERSION} \
3337
python${PYTHON_VERSION}-dev \
34-
python${PYTHON_VERSION}-venv \
35-
python-is-python3
38+
python${PYTHON_VERSION}-venv
3639

3740
# Add repo for installing latest version of cmake
3841
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null; \
@@ -41,7 +44,6 @@ RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/nul
4144
rm /usr/share/keyrings/kitware-archive-keyring.gpg
4245

4346
RUN apt install -y kitware-archive-keyring
44-
RUN add-apt-repository -y ppa:deadsnakes/ppa; apt-get update; apt-get upgrade
4547

4648
RUN apt-get -y install \
4749
cmake \

utils/docker/base_images/ubuntu22.04/ros2.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ COPY requirements_cpu.txt /opt/requirements.txt
8282
RUN python${PYTHON_VERSION} -m venv /opt/venv
8383
RUN /opt/venv/bin/pip install --no-cache-dir wheel
8484
RUN /opt/venv/bin/pip install --no-cache-dir -r /opt/requirements.txt
85-
RUN /opt/venv/bin/pip install --no-cache-dir catkin_pkg empy==3.3.4 lark
85+
RUN /opt/venv/bin/pip install --no-cache-dir catkin_pkg empy==3.3.4 lark tomli
8686
ENV VENV_PATH=/opt/venv
8787

8888
COPY .ros.humble.bashrc /root/.bashrc

utils/docker/create_container.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ if [[ ${ROS_IMAGE} == true ]]; then
6565
fi
6666

6767
IMAGE_NAME="${IMAGE_BASE_NAME}:${IMAGE_TAG}"
68+
docker pull ${IMAGE_NAME}
6869

6970
if [ -z ${CONTAINER_NAME} ]; then
7071
CONTAINER_NAME="coverage-control-${USER}"
@@ -73,7 +74,7 @@ fi
7374
docker run -it \
7475
--name=${CONTAINER_NAME} \
7576
${CONTAINER_OPTIONS} \
76-
--env=CoverageControl_WS=${CONTAINER_CC_WS} \
77+
--env=CoverageControl_ws=${CONTAINER_CC_WS} \
7778
--net=host \
7879
--privileged \
7980
--ipc=host \

0 commit comments

Comments
 (0)