-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
armhf support #3
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
ARG RASPBIAN_VERSION=stretch | ||
FROM resin/rpi-raspbian:$RASPBIAN_VERSION | ||
|
||
# update apt | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends apt-utils \ | ||
# install necessary build tools \ | ||
&& apt-get -qy install build-essential cmake pkg-config unzip wget make \ | ||
# install necessary libraries \ | ||
&& apt-get -qy install \ | ||
libgtk2.0-dev \ | ||
libgtk-3-dev \ | ||
libatlas-base-dev \ | ||
gfortran \ | ||
python2.7-dev \ | ||
python3-dev \ | ||
python-pip \ | ||
python-numpy \ | ||
python3-pip \ | ||
python3-numpy \ | ||
python3-markdown \ | ||
python3-networkx \ | ||
python3-h5py \ | ||
python3-lxml \ | ||
python3-matplotlib \ | ||
python3-protobuf \ | ||
python3-dateutil \ | ||
python3-scipy \ | ||
python3-six \ | ||
libraspberrypi0 \ | ||
python-setuptools \ | ||
python3-setuptools \ | ||
# cleanup apt. \ | ||
&& apt-get purge -y --auto-remove \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /root/ | ||
|
||
COPY requirements.txt ./ | ||
|
||
RUN pip3 install -r requirements.txt | ||
|
||
RUN wget https://storage.googleapis.com/download.tensorflow.org/deps/pi/2018_03_22/tensorflow-1.6.0-cp35-none-any.whl | ||
RUN pip3 install tensorflow-1.6.0-cp35-none-any.whl | ||
|
||
ENV TF_CPP_MIN_LOG_LEVEL=3 | ||
COPY *.py ./ | ||
|
||
RUN python3 ./pre_download.py | ||
|
||
RUN curl -sSL https://github.com/openfaas/faas/releases/download/0.7.0/fwatchdog-armhf > /usr/bin/fwatchdog \ | ||
&& chmod +x /usr/bin/fwatchdog | ||
|
||
ENV write_debug="true" | ||
ENV fprocess="python3 index.py" | ||
|
||
CMD ["fwatchdog"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -585,5 +585,5 @@ def invoke(body): | |
######################################################################## | ||
|
||
if __name__ == '__main__': | ||
print(invoke()) | ||
print(invoke(os.path.join(data_dir, 'cropped_panda.jpg'))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did this change get made? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when testing inception.py to make sure tensorflow worked, i wanted to run 'python3 inception.py', but the old version didn't supply a body arg so it crashed. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,20 +13,27 @@ | |
# want to install the CPU or GPU version of TensorFlow. | ||
# | ||
################################################################ | ||
# Wheel needs to be installed directly for tensorflow installation to work | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These changes may break the regular x86_64 version, what if we added a new requirements-armhf.txt file? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah yes good catch. we'll need that |
||
wheel | ||
|
||
|
||
# Basic packages used in many of the tutorials. | ||
# using apt for some like numpy and scipy, others skipping for the inception POC | ||
|
||
numpy | ||
scipy | ||
jupyter | ||
matplotlib | ||
Pillow | ||
scikit-learn | ||
# numpy | ||
# scipy | ||
# jupyter | ||
# matplotlib | ||
# Pillow | ||
# scikit-learn | ||
|
||
################################################################ | ||
# TensorFlow can be installed either as CPU or GPU versions. | ||
# You select which one to install by (un)commenting these lines. | ||
|
||
tensorflow # CPU Version of TensorFlow. | ||
# install with wheel file inside Dockerfile.armhf instead | ||
|
||
# tensorflow # CPU Version of TensorFlow. | ||
# tensorflow-gpu # GPU version of TensorFlow. | ||
|
||
# Builder API for TensorFlow used in many of the tutorials. | ||
|
@@ -43,3 +50,6 @@ prettytensor | |
http_parser | ||
|
||
requests | ||
|
||
# version locked tensorflow dependency | ||
grpcio==1.9.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we && these instructions for fewer layers with
rm tensorflow-1.6.0-cp35-none-any.whl
being part of that same block?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the pip req install is so tightly coupled to tensorflow, probably better to also group the installation of the wheel file itself too (the layer right after L43 as well..).