forked from FloopCZ/tensorflow_cc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
archlinux
37 lines (31 loc) · 1.01 KB
/
archlinux
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
FROM pritunl/archlinux
# denotes whether shared or static tensorflow is built
ARG shared=OFF
RUN pacman -S --noconfirm base-devel cmake gcc6 bazel git unzip mlocate \
python python-numpy wget
RUN pacman -Scc --noconfirm
# when building TF with Intel MKL support, `locate` database needs to exist
RUN updatedb
# copy the contents of this repository to the container
COPY . tensorflow_cc
# alternatively, clone the repository
# RUN git clone https://github.com/FloopCZ/tensorflow_cc.git
# install tensorflow
RUN mkdir /tensorflow_cc/tensorflow_cc/build
WORKDIR /tensorflow_cc/tensorflow_cc/build
# configure only shared or only static library
RUN if [ "${shared}" = "OFF" ]; then \
cmake ..; \
else \
cmake -DTENSORFLOW_STATIC=OFF -DTENSORFLOW_SHARED=ON ..; \
fi
# build
RUN make
# cleanup after bazel
RUN rm -rf ~/.cache
# install
RUN make install
# build and run example
RUN mkdir /tensorflow_cc/example/build
WORKDIR /tensorflow_cc/example/build
RUN cmake .. && make && ./example