-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (29 loc) · 896 Bytes
/
Dockerfile
File metadata and controls
40 lines (29 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#from alpine/make as build
#
#run apk update && \
# apk add --no-cache \
# build-base \
# gcc
from debian:stable-slim as build
run apt-get update && \
apt-get install --no-install-recommends -y \
build-essential \
ca-certificates \
wget
run mkdir /build
workdir /build
ARG TF_TYPE=cpu
ARG TF_VERSION=2.6.0
# install tf lib
run wget -q https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-$TF_TYPE-linux-x86_64-$TF_VERSION.tar.gz
run tar -xvf ./libtensorflow-$TF_TYPE-linux-x86_64-$TF_VERSION.tar.gz
copy ./src ./src
copy ./include/tf_utils.h ./include/
copy ./Makefile .
run make all
# build a tar file to preserve the symlinks, otherwise we duplicate
# tensorflow.so (~300Mb) three times.
run tar cfz deploy.tar.gz ./bin/* ./lib/*
from debian:stable-slim as deploy
copy --from=build /build/deploy.tar.gz /
run tar xvf deploy.tar.gz