Skip to content

Commit

Permalink
feat: add tensorflow-cpu
Browse files Browse the repository at this point in the history
Signed-off-by: Massimiliano Giovagnoli <massimiliano.giovagnoli@chainguard.dev>
  • Loading branch information
maxgio92 committed Dec 20, 2024
1 parent 01f544d commit 062a755
Showing 1 changed file with 97 additions and 0 deletions.
97 changes: 97 additions & 0 deletions tensorflow-cpu.yaml
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

0 comments on commit 062a755

Please sign in to comment.