Skip to content

Commit

Permalink
Remove build folder in CI to save space
Browse files Browse the repository at this point in the history
except lib / bin
  • Loading branch information
ssheorey committed Mar 26, 2024
1 parent 8ed4176 commit 543292b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
1 change: 1 addition & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ jobs:
uses: actions/download-artifact@v4
with:
pattern: open3d-*win*.whl
merge-multiple: true

- name: Set up Python
uses: actions/setup-python@v5
Expand Down
2 changes: 1 addition & 1 deletion cpp/pybind/pipelines/registration/registration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ Sets :math:`c = 1` if ``with_scaling`` is ``False``.
"Check if two point clouds build the polygons with similar "
"edge lengths. That is, checks if the lengths of any two "
"arbitrary edges (line formed by two vertices) individually "
"drawn withinin source point cloud and within the target "
"drawn within the source point cloud and within the target "
"point cloud with correspondences are similar. The only "
"parameter similarity_threshold is a number between 0 "
"(loose) and 1 (strict)");
Expand Down
5 changes: 4 additions & 1 deletion docker/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ARG BUILD_TENSORFLOW_OPS
ARG BUILD_PYTORCH_OPS
ARG PACKAGE
ARG BUILD_SYCL_MODULE
ARG CI

RUN if [ -z "${DEVELOPER_BUILD}" ]; then echo "Error: ARG DEVELOPER_BUILD not specified."; exit 1; fi \
&& if [ -z "${CCACHE_TAR_NAME}" ]; then echo "Error: ARG CCACHE_TAR_NAME not specified."; exit 1; fi \
Expand Down Expand Up @@ -210,7 +211,9 @@ RUN \
&& make install-pip-package -j$(nproc) \
&& make install -j$(nproc) \
&& if [ "${PACKAGE}" = "ON" ]; then make package; fi \
&& if [ "${PACKAGE}" = "VIEWER" ]; then make package-Open3DViewer-deb; fi
&& if [ "${PACKAGE}" = "VIEWER" ]; then make package-Open3DViewer-deb; fi \
&& if [ ${CI:-}a != a ]; then ls | grep -Ev '^bin$|^lib$' | xargs rm -rf ; fi
# If CI is not null or unset, remove all build folders except bin and lib to save disk space

# Compress ccache folder, move to / directory
RUN ccache -s \
Expand Down
5 changes: 4 additions & 1 deletion docker/Dockerfile.wheel
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ARG CCACHE_VERSION
ARG PYTHON_VERSION
ARG BUILD_TENSORFLOW_OPS
ARG BUILD_PYTORCH_OPS
ARG CI

# Forward all ARG to ENV
# ci_utils.sh requires these environment variables
Expand Down Expand Up @@ -130,7 +131,9 @@ WORKDIR /root/Open3D
RUN export NPROC=$(nproc) \
&& export BUILD_SHARED_LIBS=OFF \
&& source /root/Open3D/util/ci_utils.sh \
&& build_pip_package build_azure_kinect build_jupyter
&& build_pip_package build_azure_kinect build_jupyter \
&& if [ ${CI:-}a != a ]; then cd /root/Open3D/build/ && ls | grep -Ev '^lib$' | xargs rm -rf ; fi
# remove build folder (except lib) to save CI space on Github

# Compress ccache folder, move to / directory
RUN ccache -s \
Expand Down
16 changes: 4 additions & 12 deletions docker/docker_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,11 @@ cuda_wheel_build() {
--build-arg PYTHON_VERSION="${PYTHON_VERSION}" \
--build-arg BUILD_TENSORFLOW_OPS="${BUILD_TENSORFLOW_OPS}" \
--build-arg BUILD_PYTORCH_OPS="${BUILD_PYTORCH_OPS}" \
--build-arg CI="${CI:-}" \
-t open3d-ci:wheel \
-f docker/Dockerfile.wheel .
popd
if [ ! -z ${CI+x} ] ; then # Is CI env var set?
echo "[cuda_wheel_build()] Remove build cache to recover disk space..."
df -h $PWD
docker builder prune --all --force
df -h $PWD
fi
df -h $PWD

python_package_dir=/root/Open3D/build/lib/python_package
docker run -v "${PWD}:/opt/mount" --rm open3d-ci:wheel \
Expand Down Expand Up @@ -255,15 +251,11 @@ ci_build() {
--build-arg BUILD_PYTORCH_OPS="${BUILD_PYTORCH_OPS}" \
--build-arg PACKAGE="${PACKAGE}" \
--build-arg BUILD_SYCL_MODULE="${BUILD_SYCL_MODULE}" \
--build-arg CI="${CI:-}" \
-t "${DOCKER_TAG}" \
-f docker/Dockerfile.ci .
popd
if [ ! -z ${CI+x} ] ; then # Is CI env var set?
echo "[ci_build()] Remove build cache to recover disk space..."
df -h $PWD
docker builder prune --all --force
df -h $PWD
fi
df -h $PWD

docker run -v "${PWD}:/opt/mount" --rm "${DOCKER_TAG}" \
bash -cx "cp /open3d* /opt/mount \
Expand Down

0 comments on commit 543292b

Please sign in to comment.