-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Massimiliano Giovagnoli <massimiliano.giovagnoli@chainguard.dev>
- Loading branch information
Showing
1 changed file
with
108 additions
and
0 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,108 @@ | ||
package: | ||
name: py3-tensorflow-cpu | ||
version: 0_git20241219 | ||
epoch: 1 | ||
description: tensorflow-cpu | ||
copyright: | ||
- license: Apache 2.0 | ||
dependencies: | ||
provider-priority: 0 | ||
|
||
vars: | ||
pypi-package: tensorflow-cpu | ||
prefix: /usr | ||
|
||
data: | ||
- name: py-versions | ||
items: | ||
3.12: '312' | ||
# 3.13 is not supported yet: https://pypi.org/project/tf-nightly/ | ||
|
||
environment: | ||
contents: | ||
packages: | ||
- build-base | ||
- busybox | ||
- py3.12-pip | ||
- python-3.12 | ||
environment: | ||
# This is needed to work around the error "ValueError: ZIP does not support timestamps before 1980" | ||
SOURCE_DATE_EPOCH: 315532800 | ||
|
||
pipeline: | ||
- uses: git-checkout | ||
with: | ||
expected-commit: d311fe017c036143186f9185f491fa6d6461a84e | ||
repository: https://github.com/tensorflow/build | ||
branch: master | ||
|
||
subpackages: | ||
- range: py-versions | ||
name: py${{range.key}}-${{vars.pypi-package}} | ||
description: ${{vars.pypi-package}} installed for python${{range.key}} | ||
dependencies: | ||
runtime: | ||
- python-${{range.key}} | ||
- py${{range.key}}-pip | ||
provider-priority: ${{range.value}} | ||
pipeline: | ||
- working-directory: tensorflow_runtime_dockerfiles | ||
pipeline: | ||
- name: Install cpu requirements | ||
runs: | | ||
pip${{range.key}} install \ | ||
--root ${{targets.contextdir}} \ | ||
--prefix ${{vars.prefix}} \ | ||
-r cpu.requirements.txt | ||
- name: Install Tensorflow | ||
runs: | | ||
pip${{range.key}} install \ | ||
--root ${{targets.contextdir}} \ | ||
--prefix ${{vars.prefix}} \ | ||
tf-nightly | ||
- name: Install jupyter requirements | ||
runs: | | ||
pip${{range.key}} install \ | ||
--root ${{targets.contextdir}} \ | ||
--prefix ${{vars.prefix}} \ | ||
-r jupyter.requirements.txt | ||
- name: Install bashrc | ||
runs: | | ||
mkdir -p ${{targets.contextdir}}/etc | ||
cp bashrc ${{targets.contextdir}}/etc/bash.bashrc | ||
- name: Install tensorflow tutorials | ||
runs: | | ||
mkdir -p ${{targets.contextdir}}/tf/tensorflow-tutorials | ||
cp jupyter.readme.md ${{targets.contextdir}}/tf/tensorflow-tutorials/README.md | ||
test: | ||
environment: | ||
contents: | ||
packages: | ||
- curl | ||
pipeline: | ||
- name: Test import of IPython kernel for Jupyter | ||
runs: | | ||
python3 -m ipykernel.kernelspec | ||
- name: Test import of Tensorflow | ||
- runs: | | ||
python -c 'import tensorflow as tf' | ||
- name: Test Juputer notebook run | ||
runs: | | ||
mkdir /tmp/tf | ||
jupyter notebook --notebook-dir=/tmp/tf --ip 0.0.0.0 --no-browser --allow-root >/dev/null 2>&1 & | ||
pid=$! | ||
sleep 5 | ||
curl --fail --location --request GET --head localhost:8888 | ||
kill $pid | ||
update: | ||
enabled: true | ||
git: {} | ||
schedule: | ||
period: daily | ||
reason: Upstream does not maintain tags or releases | ||
|