forked from microsoft/azurelinux
-
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.
Update tensorboard to 2.16.2 (microsoft#8942)
- Loading branch information
Showing
7 changed files
with
110 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff -urN tensorboard-2.16.2/tensorboard/pip_package/build_pip_package.sh tensorboard-2.16.2/tensorboard/pip_package/build_pip_package.sh | ||
--- tensorboard-2.16.2/tensorboard/pip_package/build_pip_package.sh 2024-04-29 08:54:07.635971311 -0700 | ||
+++ tensorboard-2.16.2/tensorboard/pip_package/build_pip_package.sh 2024-04-29 08:55:27.281331937 -0700 | ||
@@ -103,8 +103,6 @@ | ||
|
||
virtualenv -q -p python3 venv | ||
export VIRTUAL_ENV=venv | ||
- export PATH="${PWD}/venv/bin:${PATH}" | ||
- unset PYTHON_HOME | ||
|
||
# Require wheel for bdist_wheel command, and setuptools 36.2.0+ so that | ||
# env markers are handled (https://github.com/pypa/setuptools/pull/1081) |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Three things important for creating the cache | ||
# i) Bazel version should match .bazelversion file | ||
# ii) The Working directory should match the directory where this cache will be used. | ||
# for example: In AZL3.0 tensorflow is built in "/usr/src/azl/BUILD/tensorflow-$version". | ||
# iii) Python version should match the version in caching phase and the build phase | ||
|
||
FROM mcr.microsoft.com/cbl-mariner/base/core:2.0 | ||
|
||
ARG TB_VERSION | ||
|
||
WORKDIR /root/ | ||
# RUN tdnf -y install createrepo | ||
# COPY RPMS /opt/rpms | ||
# COPY custom.repo /etc/yum.repos.d | ||
|
||
# COPY toolchain_rpms /opt/rpms | ||
# RUN createrepo /opt/rpms | ||
#bazel version must match with the .bazelversion | ||
RUN tdnf -y install build-essential git tar bazel python3-devel python3-numpy python3-pip python3-wheel python3-six python3-setuptools python3-virtualenv python3-protobuf python3-absl-py gcc zlib wget ca-certificates | ||
RUN tdnf -y install which python3-werkzeug | ||
# Create Working Directory | ||
RUN wget https://github.com/tensorflow/tensorboard/archive/refs/tags/$TB_VERSION.tar.gz | ||
RUN mkdir -p /usr/src/azl/BUILD | ||
RUN tar -xvf $TB_VERSION.tar.gz -C /usr/src/azl/BUILD | ||
WORKDIR /usr/src/azl/BUILD/tensorboard-$TB_VERSION | ||
RUN ln -s /usr/bin/python3 /usr/bin/python | ||
|
||
RUN bazel --output_user_root=./tb_tmp fetch //tensorboard/pip_package:build_pip_package | ||
# As compiling start we exit the command. This indicates all the dependencies has been downloaded | ||
# should take 5-10 mins | ||
RUN bazel --output_user_root=./tb_tmp build //tensorboard/pip_package:build_pip_package > /tmp/bazel_output.log 2>&1 & \ | ||
pid=$! && \ | ||
while true; do \ | ||
if grep -q "Compiling" /tmp/bazel_output.log; then \ | ||
echo "Compiling detected, exiting..." && \ | ||
kill $pid && \ | ||
exit 0; \ | ||
fi; \ | ||
sleep 1; \ | ||
done | ||
|
||
|
||
# clean up any compiled code | ||
RUN bazel clean | ||
|
||
WORKDIR /usr/src/azl/BUILD | ||
RUN tar -czf tensorboard-$TB_VERSION.tar.gz tensorboard-$TB_VERSION | ||
RUN mv tensorboard-$TB_VERSION.tar.gz /root | ||
|
||
CMD ["bash"] |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# output = tensorboard-$TB_VERSION.tar.gz | ||
# Tensorboard version to use | ||
TB_VERSION="2.16.2" | ||
|
||
docker build --build-arg TB_VERSION=$TB_VERSION -t tensorboard . | ||
|
||
CONTAINER_ID=$(docker run -d tensorboard) | ||
|
||
docker cp $CONTAINER_ID:/root/tensorboard-$TB_VERSION.tar.gz $PWD | ||
|
||
docker stop $CONTAINER_ID | ||
docker rm $CONTAINER_ID |
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"Signatures": { | ||
"python-tensorboard-2.11.0.tar.gz": "4045f3eca77ef335dcd70879ff9aecc2d2ba09e3fb5f39e501f868b4ab23c2b2", | ||
"python-tensorboard-2.11.0-cache.tar.gz": "77b35869c63fc15b5cdeeff3dc6ac472e79a62739a69537bf60a38fa902b66a4" | ||
"python-tensorboard-2.16.2.tar.gz": "9e69ad2243289a82500547271a213a4ee7a8be89fdebdd87372dac953e61b834" | ||
} | ||
} | ||
} |
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