forked from rerun-io/rerun
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify docker image to only include rustup and essential system libs (
rerun-io#5932) ### What - Resolves: rerun-io#5906 A lot of stuff in the docker container is now in pixi or managed via other explicit configuration steps. The wheel-testing job was the only one that had issues. I moved the job invocations over to pixi and introduced a new `wheel-test` pixi env to avoid needing to pull torch into the normal pixi env. ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/5932?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/5932?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! - [PR Build Summary](https://build.rerun.io/pr/5932) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
- Loading branch information
Showing
11 changed files
with
2,368 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ FROM ubuntu:20.04 | |
LABEL maintainer="[email protected]" | ||
# Remember to update the version in publish.sh | ||
# TODO(jleibs) use this version in the publish.sh script and below in the CACHE_KEY | ||
LABEL version="0.13.0" | ||
LABEL version="0.14.0" | ||
LABEL description="Docker image used for the CI of https://github.com/rerun-io/rerun" | ||
|
||
# Install the ubuntu package dependencies | ||
|
@@ -37,78 +37,15 @@ RUN set -eux; \ | |
sudo; \ | ||
rm -rf /var/lib/apt/lists/*; | ||
|
||
# Need a more recent pip for manylinux packages to work properly | ||
RUN python3 -m pip install -U pip | ||
|
||
# Need a more recent clang-format for codegen | ||
RUN add-apt-repository ppa:ubuntu-toolchain-r/test && \ | ||
apt update -y && \ | ||
apt upgrade -y && \ | ||
wget https://apt.llvm.org/llvm.sh && \ | ||
chmod +x llvm.sh && \ | ||
./llvm.sh 15 && \ | ||
apt-get install clang-format-15 && \ | ||
ln -sf clang-format-15 /usr/bin/clang-format && \ | ||
rm -rf /var/lib/apt/lists/*; | ||
|
||
# Need a more recent flatbuffers for codegen | ||
RUN git clone --depth 1 --branch v23.5.9 https://github.com/google/flatbuffers.git && \ | ||
cd flatbuffers && \ | ||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release && \ | ||
make -j4 && \ | ||
make install && \ | ||
cd .. && rm -rf flatbuffers | ||
|
||
|
||
# We need a more modern patchelf than ships on ubuntu-20.04 | ||
RUN arch=$(if [ "$TARGETARCH" = "arm64" ]; then echo "aarch64"; else echo "x86_64"; fi) && \ | ||
curl --fail -L https://github.com/NixOS/patchelf/releases/download/0.17.2/patchelf-0.17.2-${arch}.tar.gz | tar -xz ./bin/patchelf | ||
|
||
# TODO(andreas): Update cargo-deny below when updating rust version to 1.70.0 or above! | ||
ENV RUSTUP_HOME=/usr/local/rustup \ | ||
CARGO_HOME=/usr/local/cargo \ | ||
PATH=/usr/local/cargo/bin:$PATH \ | ||
RUST_VERSION=1.76.0 \ | ||
RUSTUP_VERSION=1.26.0 | ||
|
||
# Install Rust | ||
# Borrowed from: https://github.com/rust-lang/docker-rust/blob/a8a2a9d/1.71.0/bookworm/Dockerfile | ||
RUN arch=$(if [ "$TARGETARCH" = "arm64" ]; then echo "aarch64"; else echo "x86_64"; fi) && \ | ||
set -eux; \ | ||
rustArch="${arch}-unknown-linux-gnu"; \ | ||
rustupSha256=$(if [ "$TARGETARCH" = "arm64" ]; then echo "673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800"; else echo "0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db"; fi); \ | ||
url="https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/${rustArch}/rustup-init"; \ | ||
wget "$url"; \ | ||
echo "${rustupSha256} *rustup-init" | sha256sum -c -; \ | ||
chmod +x rustup-init; \ | ||
./rustup-init -y --no-modify-path --profile default --default-toolchain $RUST_VERSION --default-host ${rustArch}; \ | ||
rm rustup-init; \ | ||
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \ | ||
rustup --version; \ | ||
cargo --version; \ | ||
rustc --version; | ||
|
||
# Install stuff from `rust-toolchain` | ||
ADD rust-toolchain rust-toolchain | ||
# `show` is currently the only way to install whatever is in `rust-toolchain` | ||
# This is subject to change, but there is no alternative: https://github.com/rust-lang/rustup/issues/1397 | ||
RUN rustup show | ||
|
||
# Install some cargo tools we know we'll always need | ||
# We can't do this until after we've installed rust / cargo above | ||
# Latest cargo-deny requires a rust update! | ||
RUN cargo install [email protected] | ||
RUN cargo install cargo-cranky | ||
RUN cargo install cargo-benchcmp | ||
PATH=/usr/local/cargo/bin:$PATH | ||
|
||
# Install the python build dependencies | ||
ADD rerun_py/requirements-build.txt requirements-build.txt | ||
RUN pip install -r requirements-build.txt | ||
ADD rerun_py/requirements-lint.txt requirements-lint.txt | ||
RUN pip install -r requirements-lint.txt | ||
# Install Rustup | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
|
||
# Increment this to invalidate cache | ||
ENV CACHE_KEY=rerun_docker_v0.13.0 | ||
ENV CACHE_KEY=rerun_docker_v0.14.0 | ||
|
||
# See: https://github.com/actions/runner-images/issues/6775#issuecomment-1410270956 | ||
RUN git config --system --add safe.directory '*' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.