Skip to content

Commit

Permalink
remove docker docs for Ubutu 18.04
Browse files Browse the repository at this point in the history
Debug python test failure on Jammy
  • Loading branch information
ssheorey committed Aug 7, 2024
1 parent bbdc52f commit 70c8c9a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 55 deletions.
2 changes: 1 addition & 1 deletion docker/docker_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ OPTION:
3-ml-shared-focal : CUDA CI, 3-ml-shared-focal, developer mode
4-shared-focal : CUDA CI, 4-shared-focal, developer mode
4-shared-focal-release : CUDA CI, 4-shared-focal, release mode
5-ml-jammy : CUDA CI, 5-ml-jammy, developer mode
5-ml-jammy : CUDA CI, 5-ml-jammy, developer mode
"

HOST_OPEN3D_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. >/dev/null 2>&1 && pwd)"
Expand Down
41 changes: 1 addition & 40 deletions docs/docker.in.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,46 +139,7 @@ driver with an environment variable (``EGL_PLATFORM=surfaceless``):
# Run headless rendering example without GPU (CPU rendering)
docker run -v "$PWD":/root open3d-headless:latest
In Ubuntu 18.04, we need to install some additional dependencies. Here is an
example Ubuntu / Debian based docker file that runs the ``render_to_image.py``
rendering example. Other (old) Linux (e.g. RHEL) distributions will need
different dependency packages.
.. code-block:: bash
mkdir open3d-headless-docker && cd open3d-headless-docker
wget https://raw.githubusercontent.com/isl-org/Open3D/v@OPEN3D_VERSION@/examples/python/visualization/render_to_image.py
# Build docker image
docker build -t open3d-headless -f- . <<EOF
FROM ubuntu:18.04
RUN apt-get update \
&& apt-get install --yes --no-install-recommends \
libgl1 libgomp1 python3-pip \
libdrm2 libedit2 libexpat1 libgcc-s1 libglapi-mesa libllvm10 libx11-xcb1 \
libxcb-dri2-0 libxcb-glx0 libxcb-shm0 libxcb-xfixes0 libxfixes3 \
libxxf86vm1 \
&& rm -rf /var/lib/apt/lists/*
# Install Open3D from the PyPI repositories
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
python3 -m pip install --no-cache-dir --upgrade open3d==@OPEN3D_VERSION@
WORKDIR /root/
ENTRYPOINT ["python3", "/root/render_to_image.py"]
EOF
# Run headless rendering example with Intel GPU
docker run --device=/dev/dri:/dev/dri \
-v "$PWD":/root open3d-headless:latest
# Run headless rendering example with Nvidia GPU
docker run --gpus 'all,"capabilities=compute,utility,graphics"' \
-v "$PWD":/root open3d-headless:latest
# Run headless rendering example without GPU (CPU rendering)
docker run --env OPEN3D_CPU_RENDERING=true \
-v "$PWD":/root open3d-headless:latest
After running one of these commands, there will be two offscreen rendered images
After running these commands, there will be two offscreen rendered images
``test.png`` and ``test2.png`` in the ``open3d-headless-docker`` folder.
Expand Down
22 changes: 8 additions & 14 deletions util/ci_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ test_wheel() {
python -m pip --version
echo "Installing Open3D wheel $wheel_path in virtual environment..."
python -m pip install "$wheel_path"
python -c "import open3d; print('Installed:', open3d); print('BUILD_CUDA_MODULE: ', open3d._build_config['BUILD_CUDA_MODULE'])"
python -c "import open3d; print('CUDA available: ', open3d.core.cuda.is_available())"
python -W default -c "import open3d; print('Installed:', open3d); print('BUILD_CUDA_MODULE: ', open3d._build_config['BUILD_CUDA_MODULE'])"
python -W default -c "import open3d; print('CUDA available: ', open3d.core.cuda.is_available())"
echo
# echo "Dynamic libraries used:"
# DLL_PATH=$(dirname $(python -c "import open3d; print(open3d.cpu.pybind.__file__)"))/..
Expand All @@ -260,27 +260,21 @@ test_wheel() {
# find "$DLL_PATH"/cpu/ -type f -execdir otool -L {} \;
# fi
echo
# FIXME: Needed because Open3D-ML main TF and PyTorch is older than dev.
if [ $BUILD_CUDA_MODULE == ON ]; then
install_python_dependencies with-cuda
else
install_python_dependencies
fi
if [ "$BUILD_PYTORCH_OPS" == ON ]; then
# python -m pip install -r "$OPEN3D_ML_ROOT/requirements-torch.txt"
python -c \
python -m pip install -r "$OPEN3D_ML_ROOT/requirements-torch.txt"
python -W default -c \
"import open3d.ml.torch; print('PyTorch Ops library loaded:', open3d.ml.torch._loaded)"
fi
if [ "$BUILD_TENSORFLOW_OPS" == ON ]; then
# python -m pip install -r "$OPEN3D_ML_ROOT/requirements-tensorflow.txt"
python -c \
python -m pip install -r "$OPEN3D_ML_ROOT/requirements-tensorflow.txt"
python -W default -c \
"import open3d.ml.tf.ops; print('TensorFlow Ops library loaded:', open3d.ml.tf.ops)"
fi
if [ "$BUILD_TENSORFLOW_OPS" == ON ] && [ "$BUILD_PYTORCH_OPS" == ON ]; then
echo "Importing TensorFlow and torch in the reversed order"
python -c "import tensorflow as tf; import torch; import open3d.ml.torch as o3d"
python -W default -c "import tensorflow as tf; import torch; import open3d.ml.torch as o3d"
echo "Importing TensorFlow and torch in the normal order"
python -c "import open3d.ml.torch as o3d; import tensorflow as tf; import torch"
python -W default -c "import open3d.ml.torch as o3d; import tensorflow as tf; import torch"
fi
deactivate open3d_test.venv # argument prevents unbound variable error
}
Expand Down

0 comments on commit 70c8c9a

Please sign in to comment.