Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add telemetry installs to ci-conda and ci-wheel #196

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ci-conda.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,18 @@ wget https://github.com/cli/cli/releases/download/v${GH_CLI_VER}/gh_${GH_CLI_VER
tar -xf gh_*.tar.gz
mv gh_*/bin/gh /usr/local/bin
rm -rf gh_*

# Install OpenTelemetry instrumentation
pip install opentelemetry-distro[otlp] opentelemetry-exporter-prometheus
curl -L -o "otel-cli-${CPU_ARCH}.tar.gz" https://github.com/equinix-labs/otel-cli/releases/download/v0.4.5/otel-cli_0.4.5_linux_${CPU_ARCH}.tar.gz
tar -zxf "otel-cli-${CPU_ARCH}.tar.gz"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a few more files inside this tarball that may need to be cleaned up after extraction (see screenshot below)

image

to avoid having to clean these up, you can specify which files you want to extract like this:

# specify the path of the files you wish to extract from the tarball after the tarball filename
tar -zxf "otel-cli-${CPU_ARCH}.tar.gz" otel-cli

this will ensure that the LICENSE, README.md, and CHANGELOG.md files don't get extracted and clutter up the filesystem.

if you want to get real fancy, you can use a pipe to avoid saving the tarball to the filesystem entirely:

wget -qO- https://github.com/equinix-labs/otel-cli/releases/download/v0.4.5/otel-cli_0.4.5_linux_${CPU_ARCH}.tar.gz | tar xzf - -C /usr/local/bin otel-cli

then you can skip the subsequent rm -rf command altogether.

source: https://unix.stackexchange.com/q/85194

mv otel-cli /usr/local/bin/
git clone -b add-conda-build-instrumentation https://github.com/msarahan/opentelemetry-python-contrib
msarahan marked this conversation as resolved.
Show resolved Hide resolved
pip install -e ./opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-conda-build
opentelemetry-bootstrap -a install
EOF


# Install codecov from source distribution
ARG CODECOV_VER=notset
RUN <<EOF
Expand Down
11 changes: 11 additions & 0 deletions ci-wheel.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,15 @@ RUN git config --system --add safe.directory '*'
# Add pip.conf
COPY pip.conf /etc/xdg/pip/pip.conf

RUN <<EOF
# Install OpenTelemetry instrumentation
pip install opentelemetry-distro[otlp] opentelemetry-exporter-prometheus
curl -L -o "otel-cli-${CPU_ARCH}.tar.gz" https://github.com/equinix-labs/otel-cli/releases/download/v0.4.5/otel-cli_0.4.5_linux_${CPU_ARCH}.tar.gz
tar -zxf "otel-cli-${CPU_ARCH}.tar.gz"
mv otel-cli /usr/local/bin/
git clone -b add-conda-build-instrumentation https://github.com/msarahan/opentelemetry-python-contrib
msarahan marked this conversation as resolved.
Show resolved Hide resolved
pip install -e ./opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-conda-build
opentelemetry-bootstrap -a install
EOF

CMD ["/bin/bash"]
12 changes: 12 additions & 0 deletions citestwheel.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ FROM ${BASE_IMAGE}
ARG CUDA_VER=notset
ARG LINUX_VER=notset
ARG PYTHON_VER=notset
ARG CPU_ARCH=notset

# Set RAPIDS versions env variables
ENV RAPIDS_CUDA_VERSION="${CUDA_VER}"
Expand Down Expand Up @@ -103,6 +104,17 @@ python -m pip install "rapids-dependency-file-generator==1.*"
pyenv rehash
EOF

RUN <<EOF
# Install OpenTelemetry instrumentation
pip install opentelemetry-distro[otlp] opentelemetry-exporter-prometheus
curl -L -o "otel-cli-${CPU_ARCH}.tar.gz" https://github.com/equinix-labs/otel-cli/releases/download/v0.4.5/otel-cli_0.4.5_linux_${CPU_ARCH}.tar.gz
tar -zxf "otel-cli-${CPU_ARCH}.tar.gz"
mv otel-cli /usr/local/bin/
git clone -b add-conda-build-instrumentation https://github.com/msarahan/opentelemetry-python-contrib
msarahan marked this conversation as resolved.
Show resolved Hide resolved
pip install -e ./opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-conda-build
opentelemetry-bootstrap -a install
EOF

# Install latest gha-tools
RUN wget https://github.com/rapidsai/gha-tools/releases/latest/download/tools.tar.gz -O - \
| tar -xz -C /usr/local/bin
Expand Down
Loading