-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile_base_tensorflow
41 lines (35 loc) · 1.25 KB
/
Dockerfile_base_tensorflow
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
41
# Stage 2: Install Tensorflow
FROM arm32v7/xenial:python
LABEL maintainer="[email protected]"
# Fix libstdc++.so.6: version `GLIBCXX_3.4.22' not found
# when import tensorflow
# https://github.com/lhelontra/tensorflow-on-arm/issues/13
RUN sudo apt-get install -y software-properties-common
# RUN sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
# sudo apt-get update && \
# sudo apt-get -y install gcc-4.9 && \
# sudo apt-get -y upgrade libstdc++6
# Install Tensorflow and Scikit-image
ENV TF_VERSION 1.9.0
ENV TENSORFLOW tensorflow-${TF_VERSION}-cp35-none-linux_armv7l.whl
ENV SKI_VERSION 0.13.0
ENV SK_IMAGE scikit_image-${SKI_VERSION}-cp35-cp35m-linux_armv7l.whl
ENV NP_VERSION 1.13.0
ENV NUMPY numpy-${NP_VERSION}-cp35-cp35m-linux_armv7l.whl
# Copy over the Numpy wheel file
COPY ./installation/${NUMPY} .
# Install tensorflow
RUN pip3 install ./${NUMPY}
# Copy over the Scikit-image wheel file
COPY ./installation/${SK_IMAGE} .
# Install Scikit-image
RUN pip3 install ./${SK_IMAGE}
# Copy over the Tensorflow wheel file
COPY ./installation/${TENSORFLOW} .
# Install tensorflow
RUN pip3 install ./${TENSORFLOW}
# Do clean jobs
RUN rm -rf /${TENSORFLOW}
RUN rm -rf /${SK_IMAGE}
RUN rm -rf /${NUMPY}
RUN sudo apt-get clean && sudo apt-get autoremove