Skip to content

Commit 042d450

Browse files
authored
[examples] Added basic tensorflow example (#989)
## Summary title says it. ## How was it tested? - `cd devbox/examples/data_science/tensorflow/` - `devbox shell` - `python3 main.py`
1 parent a1d77e7 commit 042d450

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Tensorflow application
2+
3+
Simple Tensorflow sample project with Devbox.
4+
5+
## Setup
6+
7+
- Make sure to have [devbox installed](https://www.jetpack.io/devbox/docs/quickstart/#install-devbox)
8+
- Clone this repo: `git clone https://github.com/jetpack-io/devbox.git`
9+
- `cd devbox/examples/data_science/tensorflow/`
10+
- `devbox shell`
11+
- `python3 main.py`
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"packages": [
3+
"python310",
4+
"python310Packages.pip",
5+
"stdenv.cc.cc.lib"
6+
],
7+
"shell": {
8+
"init_hook": [
9+
"source $VENV_DIR/bin/activate",
10+
"pip install -r requirements.txt"
11+
]
12+
},
13+
"nixpkgs": {
14+
"commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62"
15+
}
16+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import tensorflow as tf
2+
3+
# Simple python script using Tensorflow
4+
print(tf.reduce_sum(tf.random.normal([1000, 1000])))
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tf-nightly

0 commit comments

Comments
 (0)