Skip to content

Commit f0d2976

Browse files
committed
Better build process
1 parent 8c55ab4 commit f0d2976

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
wheels

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build:
2+
./build.sh

README.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
# tensorflow-builder
22

3-
Docker-based build environment as I needed a build of Tensorflow that didn't use modern CPU instructions
3+
Docker-based build environment that creates Tensorflow packages that don't use optimised CPU instructions such as AVX, AVX2, SSE4.1, SSE4.2 and FMA. This is the version of Tensorflow that is used in [Photonix](https://github.com/damianmoore/photonix) to maintain compatibility with as many people's machines as possible. Performance testing [detailed here](https://github.com/damianmoore/photonix/issues/48#issuecomment-455368921) showed a 13% longer execution time than the official, optimised builds.
4+
5+
6+
## Building
7+
8+
Running the command below should output a Python Wheel package in a directory called `wheels`. Beware that building will probably take many hours. Check out the [releases page](https://github.com/damianmoore/tensorflow-builder/releases) to make use of our builds.
9+
10+
```
11+
make build
12+
```

build.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
docker build -t tensorflow-builder .
3+
mkdir -p wheels
4+
docker run --rm -it --mount type=bind,source="$(pwd)"/wheels,target=/host_wheels tensorflow-builder bash -c "cp /wheels/* /host_wheels/"
5+
echo "\nHopefully your package is now in the 'wheels' directory."

0 commit comments

Comments
 (0)