Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tf-build
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benedikt Wildenhain
tf-build
Commits
a2610bdc
Commit
a2610bdc
authored
Mar 2, 2023
by
Austin Anderson
Browse files
Options
Downloads
Patches
Plain Diff
Update README and remove unused assembler script
parent
8392d89f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
tensorflow_runtime_dockerfiles/README.md
+41
-1
41 additions, 1 deletion
tensorflow_runtime_dockerfiles/README.md
tensorflow_runtime_dockerfiles/assembler.sh
+0
-26
0 additions, 26 deletions
tensorflow_runtime_dockerfiles/assembler.sh
with
41 additions
and
27 deletions
tensorflow_runtime_dockerfiles/README.md
+
41
−
1
View file @
a2610bdc
# TensorFlow Runtime Dockerfiles
# TensorFlow Runtime Dockerfiles
Simple Dockerfiles for running TensorFlow, with Jupyter variants.
Simple Dockerfiles for running TensorFlow, with Jupyter
and GPU
variants.
Maintainer: @angerson (TensorFlow, SIG Build)
Maintainer: @angerson (TensorFlow, SIG Build)
* * *
These containers are built by an internal job at Google and published to
[
tensorflow/tensorflow
](
https://hub.docker.com/r/tensorflow/tensorflow
)
on
Docker Hub. Here's a quick way to try out TensorFlow with GPU support and Jupyter:
```
bash
docker run
--gpus
=
all
-it
--rm
-v
$(
realpath
~/notebooks
)
:/tf/notebooks
-p
8888:8888 tensorflow/tensorflow:nightly-gpu-jupyter
```
Refer to
[
the tensorflow.org Docker installation
instructions
](
https://www.tensorflow.org/install/docker
)
for more details.
# Building Containers
Builds are straightforward. Here's a sample:
```
bash
docker build
--target
=
base
--build-arg
TENSORFLOW_PACKAGE
=
tf-nightly-cpu
-t
tensorflow-nightly
-f
cpu.Dockerfile .
```
Look at the Dockerfiles for full details.
The builds include very simple import tests to verify that the packages work.
You can run the tests like so:
```
bash
docker build
--target
=
test
--build-arg
TENSORFLOW_PACKAGE
=
tf-nightly-cpu
-f
cpu.Dockerfile
.
docker build
--target
=
base
--build-arg
TENSORFLOW_PACKAGE
=
tf-nightly-cpu
-t
tensorflow-nightly
-f
cpu.Dockerfile .
```
The test layer starts from the base layer, so the second command will complete instantly.
# Contributions
If you would like to contribute a small change, please make a pull request. For
large changes such as support for additional platforms, please clone this
directory into a new directory and update the README to indicate that you are
the new maintainer.
This diff is collapsed.
Click to expand it.
tensorflow_runtime_dockerfiles/assembler.sh
deleted
100755 → 0
+
0
−
26
View file @
8392d89f
#!/bin/bash
function
try
()
{
"
$@
"
||
echo
"failed:
$@
"
>>
log.txt
}
try docker build
--target
=
jupyter
--build-arg
TENSORFLOW_PACKAGE
=
tensorflow-cpu
-t
tensorflow/tensorflow:latest-jupyter
-f
cpu.Dockerfile
.
try docker build
--target
=
jupyter
--build-arg
TENSORFLOW_PACKAGE
=
tensorflow
-t
tensorflow/tensorflow:latest-gpu-jupyter
-f
gpu.Dockerfile
.
try docker build
--target
=
base
--build-arg
TENSORFLOW_PACKAGE
=
tensorflow-cpu
-t
tensorflow/tensorflow:latest
-f
cpu.Dockerfile
.
try docker build
--target
=
base
--build-arg
TENSORFLOW_PACKAGE
=
tensorflow
-t
tensorflow/tensorflow:latest-gpu
-f
gpu.Dockerfile
.
try docker build
--target
=
jupyter
--build-arg
TENSORFLOW_PACKAGE
=
tensorflow-cpu
-t
tensorflow/tensorflow:latest-jupyter
-f
cpu.Dockerfile
.
try docker build
--target
=
jupyter
--build-arg
TENSORFLOW_PACKAGE
=
tf-nightly-cpu
-t
tensorflow/tensorflow:nightly-jupyter
-f
cpu.Dockerfile
.
try docker build
--target
=
jupyter
--build-arg
TENSORFLOW_PACKAGE
=
tensorflow
-t
tensorflow/tensorflow:latest-gpu-jupyter
-f
gpu.Dockerfile
.
try docker build
--target
=
jupyter
--build-arg
TENSORFLOW_PACKAGE
=
tf-nightly
-t
tensorflow/tensorflow:nightly-gpu-jupyter
-f
gpu.Dockerfile
.
try docker build
--target
=
base
--build-arg
TENSORFLOW_PACKAGE
=
tensorflow-cpu
-t
tensorflow/tensorflow:latest
-f
cpu.Dockerfile
.
try docker build
--target
=
base
--build-arg
TENSORFLOW_PACKAGE
=
tf-nightly-cpu
-t
tensorflow/tensorflow:nightly
-f
cpu.Dockerfile
.
try docker build
--target
=
base
--build-arg
TENSORFLOW_PACKAGE
=
tensorflow
-t
tensorflow/tensorflow:latest-gpu
-f
gpu.Dockerfile
.
try docker build
--target
=
base
--build-arg
TENSORFLOW_PACKAGE
=
tf-nightly
-t
tensorflow/tensorflow:nightly-gpu
-f
gpu.Dockerfile
.
if
[[
-s
log.txt
]]
;
then
echo
"all these failed:"
cat
log.txt
exit
1
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment