This repository was archived by the owner on Feb 8, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +145
-0
lines changed Expand file tree Collapse file tree 9 files changed +145
-0
lines changed Original file line number Diff line number Diff line change
1
+ Dockerfile for tensorflow
2
+ --------------------------------------------------------
3
+
4
+ - [ tea0water/tensorflow] ( tensorflow )
5
+ - [ tea0water/kata-benchmark] ( kata-benchmark )
Original file line number Diff line number Diff line change
1
+ FROM ubuntu:16.04
2
+
3
+ RUN apt-get update && \
4
+ apt-get install -y --no-install-recommends fio apache2-utils iperf redis-tools sysbench && \
5
+ apt-get clean && \
6
+ rm -rf /var/lib/apt/lists/*
7
+
8
+ COPY files/ /root/kata-benchmark/
Original file line number Diff line number Diff line change
1
+ Usage
2
+ ----------
3
+
4
+ ```
5
+ // build image tea0water/kata-benchmark
6
+ $ ./util.sh build
7
+
8
+ // run test container
9
+ $ ./util.sh run
10
+ ```
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ IMAGE_NAME=" tea0water/kata-benchmark"
4
+
5
+ function quit() {
6
+ echo $@
7
+ exit 1
8
+ }
9
+
10
+ function show_usage() {
11
+ cat << EOF
12
+ Usage: ./util.sh <action>
13
+
14
+ action:
15
+ build # build image ${IMAGE_NAME}
16
+ run # run test container
17
+ EOF
18
+ }
19
+
20
+ function build_image() {
21
+ echo " > start build $IMAGE_NAME "
22
+ docker build -t $IMAGE_NAME .
23
+ if [ $? -eq 0 ]; then
24
+ echo " > build ok"
25
+ else
26
+ quit " > build failed"
27
+ fi
28
+ }
29
+
30
+ function run_container() {
31
+ docker run -it --rm $IMAGE_NAME bash
32
+ }
33
+
34
+ # # main ##
35
+
36
+ case $1 in
37
+ build)
38
+ build_image
39
+ ;;
40
+ run)
41
+ run_container
42
+ ;;
43
+ * )
44
+ show_usage
45
+ ;;
46
+ esac
Original file line number Diff line number Diff line change
1
+ benchmarks
Original file line number Diff line number Diff line change
1
+ FROM tensorflow/tensorflow:latest
2
+ # Start a CPU-only container with Python 2
3
+
4
+ RUN apt-get update && \
5
+ apt-get install -y --no-install-recommends fio apache2-utils iperf redis-tools sysbench && \
6
+ apt-get clean && \
7
+ rm -rf /var/lib/apt/lists/*
8
+
9
+ COPY benchmarks/scripts/ /benchmarks/scripts/
Original file line number Diff line number Diff line change
1
+ Usage
2
+ ----------
3
+
4
+ ```
5
+ // build image tea0water/tensorflow
6
+ $ ./util.sh build
7
+
8
+ // run test container
9
+ $ ./util.sh run
10
+ ```
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ IMAGE_NAME=" tea0water/tensorflow"
4
+
5
+ function quit() {
6
+ echo $@
7
+ exit 1
8
+ }
9
+
10
+ function show_usage() {
11
+ cat << EOF
12
+ Usage: ./util.sh <action>
13
+
14
+ action:
15
+ build # build image ${IMAGE_NAME}
16
+ run # run test container
17
+ EOF
18
+ }
19
+
20
+ function build_image() {
21
+ if [ ! -d benchmarks ]; then
22
+ echo " > benchmarks not exist, start clone now"
23
+ git clone -v https://github.com/tensorflow/benchmarks.git
24
+ if [ $? -ne 0 ]; then
25
+ quit " error: failed to clone benchmarks"
26
+ fi
27
+ else
28
+ echo " > benchmarks is ready"
29
+ fi
30
+
31
+ echo " > start build $IMAGE_NAME "
32
+ docker build -t $IMAGE_NAME .
33
+ if [ $? -eq 0 ]; then
34
+ echo " > build ok"
35
+ else
36
+ quit " > build failed"
37
+ fi
38
+ }
39
+
40
+ function run_container() {
41
+ docker run -it --rm $IMAGE_NAME bash
42
+ }
43
+
44
+ # # main ##
45
+
46
+ case $1 in
47
+ build)
48
+ build_image
49
+ ;;
50
+ run)
51
+ run_container
52
+ ;;
53
+ * )
54
+ show_usage
55
+ ;;
56
+ esac
You can’t perform that action at this time.
0 commit comments