-
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
97 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,97 @@ | ||
package: | ||
name: tensorflow-cpu | ||
version: 0_git20241219 | ||
epoch: 1 | ||
description: tensorflow-cpu | ||
copyright: | ||
- license: Apache-2.0 | ||
dependencies: | ||
runtime: | ||
- python-3.11 | ||
- py3.11-pip | ||
|
||
vars: | ||
pypi-package: tensorflow-cpu | ||
prefix: /usr | ||
|
||
environment: | ||
contents: | ||
packages: | ||
- build-base | ||
- busybox | ||
- py3.11-pip | ||
- python-3.11 | ||
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 | ||
|
||
- working-directory: tensorflow_runtime_dockerfiles | ||
pipeline: | ||
- name: Install cpu requirements | ||
runs: | | ||
python3 -m pip install \ | ||
--no-cache-dir \ | ||
--root ${{targets.contextdir}} \ | ||
--prefix ${{vars.prefix}} \ | ||
-r cpu.requirements.txt | ||
- name: Install Tensorflow | ||
runs: | | ||
python3 -m pip install \ | ||
--no-cache-dir \ | ||
--root ${{targets.contextdir}} \ | ||
--prefix ${{vars.prefix}} \ | ||
tf-nightly | ||
- name: Install jupyter requirements | ||
runs: | | ||
python3 -m pip install \ | ||
--no-cache-dir \ | ||
--root ${{targets.contextdir}} \ | ||
--prefix ${{vars.prefix}} \ | ||
-r jupyter.requirements.txt \ | ||
-U | ||
- 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: | | ||
jupyter notebook --notebook-dir=/tf --ip 0.0.0.0 --no-browser --allow-root >/dev/null 2>&1 & | ||
pid=$! | ||
sleep 5 | ||
curl --fail --location --request GET --head --silent localhost:8888 | ||
kill $pid | ||
update: | ||
enabled: true | ||
git: {} | ||
schedule: | ||
period: daily | ||
reason: Upstream does not maintain tags or releases | ||
|