rabin %!s(int64=7) %!d(string=hai) anos
pai
achega
a8896ccd9f

+ 18 - 0
container/src/shell/learning/install/.ipynb_checkpoints/caffe2-checkpoint.sh

@@ -0,0 +1,18 @@
+#!/usr/bin/env sh
+set -e
+
+#https://caffe2.ai/docs/getting-started.html?platform=ubuntu&configuration=compile
+#openmpi-dev@testing libiomp-dev
+#http://fabiorehm.com/blog/2015/07/22/building-a-minimum-viable-phantomjs-2-docker-image/
+
+apk add build-base cmake git glog-dev gtest-dev leveldb-dev@testing openmpi-dev@testing openmpi-doc@testing lmdb-dev snappy-dev protobuf-dev protobuf-c python3-dev
+pip3 install future
+pip3 install numpy
+pip3 install protobuf
+
+
+git clone --recursive https://github.com/caffe2/caffe2.git
+cd caffe2
+make
+cd build
+make install

+ 14 - 0
container/src/shell/learning/install/.ipynb_checkpoints/jupyter-mysql-kernel-checkpoint.sh

@@ -0,0 +1,14 @@
+#!/usr/bin/env sh
+set -e
+
+pip3 install git+https://github.com/shemic/jupyter-mysql-kernel
+
+mkdir -p ~/.local/config/
+
+echo "{\n
+    "user"     : "root",\n
+    "port"     : "3306",\n
+    "host"     : "127.0.0.1",\n
+    "charset"  : "utf8",\n
+    "password" : "123456"\n
+}" > ~/.local/config/mysql_config.json

+ 18 - 0
container/src/shell/learning/install/.ipynb_checkpoints/pytorch-checkpoint.sh

@@ -0,0 +1,18 @@
+#!/usr/bin/env sh
+set -e
+
+
+#pip3 uninstall http://download.pytorch.org/whl/cpu/torch-0.3.0.post4-cp36-cp36m-linux_x86_64.whl 
+#pip3 uninstall torchvision
+
+apk add build-base python3-dev yaml-dev py3-yaml cmake git
+
+mkdir -p /tmp/pytorch
+
+git clone --recursive https://github.com/pytorch/pytorch /tmp/pytorch
+
+cd /tmp/pytorch
+
+python3 setup.py install
+
+rm -rf /tmp/*

+ 54 - 0
container/src/shell/learning/install/.ipynb_checkpoints/tensorflow-checkpoint.sh

@@ -0,0 +1,54 @@
+#!/usr/bin/env sh
+set -e
+
+#apk add build-base python3-dev libc6-compat
+
+#curl -O https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.5.0rc1-cp36-cp36m-linux_x86_64.whl
+
+#pip3 install tensorflow-1.5.0rc1-cp36-cp36m-linux_x86_64.whl
+
+# 必须重新编译了
+export JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
+export LOCAL_RESOURCES=2048,.5,1.0
+
+export BAZEL_VERSION=0.7.0
+export TENSORFLOW_VERSION=1.4.0
+
+apk add --no-cache python3-tkinter imagemagick graphviz
+apk add --no-cache --virtual=.build-deps bash cmake curl freetype-dev g++ libjpeg-turbo-dev libpng-dev linux-headers makemusl-dev openblas-dev openjdk8 patch perl python3-dev py-numpy-dev rsync sed swig zip
+cd /tmp
+pip3 install --no-cache-dir wheel
+curl -SLO https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-dist.zip
+mkdir bazel-${BAZEL_VERSION}
+unzip -qd bazel-${BAZEL_VERSION} bazel-${BAZEL_VERSION}-dist.zip
+cd bazel-${BAZEL_VERSION}
+sed -i -e '/"-std=c++0x"/{h;s//"-fpermissive"/;x;G}' tools/cpp/cc_configure.bzl
+sed -i -e '/#endif /\/ COMPILER_MSVC/{h;s//#else/;G;s//#include <sys\/stat.h>/;G;}' third_party/ijar/common.h
+bash compile.sh
+cp -p output/bazel /usr/bin/
+cd /tmp
+curl -SL https://github.com/tensorflow/tensorflow/archive/v${TENSORFLOW_VERSION}.tar.gz | tar xzf -
+cd tensorflow-${TENSORFLOW_VERSION}
+sed -i -e '/JEMALLOC_HAVE_SECURE_GETENV/d' third_party/jemalloc.BUILD
+PYTHON_BIN_PATH=/usr/bin/python3
+PYTHON_LIB_PATH=/usr/lib/python3.6/site-packages
+CC_OPT_FLAGS="-march=native"
+TF_NEED_JEMALLOC=1
+TF_NEED_GCP=0
+TF_NEED_HDFS=0
+TF_NEED_S3=0
+TF_ENABLE_XLA=0
+TF_NEED_GDR=0
+TF_NEED_VERBS=0
+TF_NEED_OPENCL=0
+TF_NEED_CUDA=0
+TF_NEED_MPI=0
+bash configure
+bazel build -c opt --local_resources ${LOCAL_RESOURCES} //tensorflow/tools/pip_package:build_pip_package
+./bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
+cd
+pip3 install --no-cache-dir /tmp/tensorflow_pkg/tensorflow-${TENSORFLOW_VERSION}-cp36-cp36m-linux_x86_64.whl
+pip3 install --no-cache-dir google-api-python-client
+apk del .build-deps
+rm -f /usr/bin/bazel
+rm -rf /tmp/* /root/.cache

+ 16 - 0
container/src/shell/learning/install/.ipynb_checkpoints/xvfb-checkpoint.sh

@@ -0,0 +1,16 @@
+#!/usr/bin/env sh
+set -e
+
+export GECKODRIVER_VERSION=0.15.0
+export GECKODRIVER_FILE=v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz
+export OPENCV_VERSION=3.3.0
+apk add --no-cache bash curl dbus firefox-esr fontconfig ttf-freefont xvfb
+pip3 install pyvirtualdisplay
+pip3 install selenium
+curl -s -o /tmp/geckodriver.tar.gz -L https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_FILE
+rm -rf /usr/bin/geckodriver
+tar -C /usr/bin -zxf /tmp/geckodriver.tar.gz
+rm /tmp/geckodriver.tar.gz
+mv /usr/bin/geckodriver /usr/bin/geckodriver-$GECKODRIVER_VERSION
+chmod 755 /usr/bin/geckodriver-$GECKODRIVER_VERSION
+ln -fs /usr/bin/geckodriver-$GECKODRIVER_VERSION /usr/bin/geckodriver

+ 6 - 0
container/src/shell/learning/install/body.sh

@@ -0,0 +1,6 @@
+#!/usr/bin/env sh
+set -e
+
+pip3 install face_recognition
+pip3 install algorithm
+git clone https://github.com/bharatsesham/OpenCV-Body-Detection

+ 18 - 0
container/src/shell/learning/install/caffe2.sh

@@ -0,0 +1,18 @@
+#!/usr/bin/env sh
+set -e
+
+#https://caffe2.ai/docs/getting-started.html?platform=ubuntu&configuration=compile
+#openmpi-dev@testing libiomp-dev
+#http://fabiorehm.com/blog/2015/07/22/building-a-minimum-viable-phantomjs-2-docker-image/
+
+apk add build-base cmake git glog-dev gtest-dev leveldb-dev@testing openmpi-dev@testing openmpi-doc@testing lmdb-dev snappy-dev protobuf-dev protobuf-c python3-dev
+pip3 install future
+pip3 install numpy
+pip3 install protobuf
+
+
+git clone --recursive https://github.com/caffe2/caffe2.git
+cd caffe2
+make
+cd build
+make install

+ 5 - 0
container/src/shell/learning/install/dlib.sh

@@ -0,0 +1,5 @@
+#!/usr/bin/env sh
+set -e
+
+apk add --no-cache cmake boost-build
+pip3 install dlib

+ 9 - 0
container/src/shell/learning/install/glibc.sh

@@ -0,0 +1,9 @@
+#!/usr/bin/env sh
+set -e
+
+export GLIB_VERSION=2.25-r0
+
+apk add --no-cache --update curl ca-certificates
+curl -Ls https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIB_VERSION}/glibc-${GLIB_VERSION}.apk > /tmp/glibc-${GLIB_VERSION}.apk
+apk add --allow-untrusted /tmp/glibc-${GLIB_VERSION}.apk
+apk del curl ca-certificates

+ 14 - 0
container/src/shell/learning/install/jupyter-mysql-kernel.sh

@@ -0,0 +1,14 @@
+#!/usr/bin/env sh
+set -e
+
+pip3 install git+https://github.com/shemic/jupyter-mysql-kernel
+
+mkdir -p ~/.local/config/
+
+echo "{\n
+    "user"     : "root",\n
+    "port"     : "3306",\n
+    "host"     : "127.0.0.1",\n
+    "charset"  : "utf8",\n
+    "password" : "123456"\n
+}" > ~/.local/config/mysql_config.json

+ 22 - 0
container/src/shell/learning/install/opencv.sh

@@ -0,0 +1,22 @@
+#!/usr/bin/env sh
+set -e
+
+export CC=/usr/bin/clang
+export CXX=/usr/bin/clang++
+export OPENCV_VERSION=3.3.0
+#echo -e '@testing http://mirrors.ustc.edu.cn/alpine/edge/testing' >> /etc/apk/repositories
+
+#apk update && apk update && apk del lapack-dev && apk add --no-cache build-base openblas-dev unzip wget cmake python3-dev libtbb@testing libtbb-dev@testing libjpeg libjpeg-turbo-dev libpng-dev jasper-dev tiff-dev libwebp-dev clang-dev linux-headers
+#pip3 install numpy
+#mkdir /opt && cd /opt
+#wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip
+#unzip ${OPENCV_VERSION}.zip
+#rm -rf ${OPENCV_VERSION}.zip
+#mkdir -p /opt/opencv-${OPENCV_VERSION}/build
+cd /opt/opencv-${OPENCV_VERSION}/build
+cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_OPENCV_HAL=OFF -D WITH_FFMPEG=NO -D WITH_IPP=NO -D WITH_OPENEXR=NO -D WITH_TBB=YES -D BUILD_EXAMPLES=NO -D BUILD_ANDROID_EXAMPLES=NO -D INSTALL_PYTHON_EXAMPLES=NO -D BUILD_DOCS=NO -D BUILD_opencv_python2=NO -D BUILD_opencv_python3=ON -D PYTHON3_EXECUTABLE=/usr/bin/python3 -D PYTHON3_INCLUDE_DIR=/usr/include/python3.6m/ -D PYTHON3_LIBRARY=/usr/lib/libpython3.so -D PYTHON_LIBRARY=/usr/lib/libpython3.so -D PYTHON3_PACKAGES_PATH=/usr/lib/python3.6/site-packages/ -D PYTHON3_NUMPY_INCLUDE_DIRS=/usr/lib/python3.6/site-packages/numpy/core/include/ ..
+make VERBOSE=1
+make
+make install
+rm -rf /opt/opencv-${OPENCV_VERSION}
+#apk del cmake build-base

+ 18 - 0
container/src/shell/learning/install/pytorch.sh

@@ -0,0 +1,18 @@
+#!/usr/bin/env sh
+set -e
+
+
+#pip3 uninstall http://download.pytorch.org/whl/cpu/torch-0.3.0.post4-cp36-cp36m-linux_x86_64.whl 
+#pip3 uninstall torchvision
+
+apk add build-base python3-dev yaml-dev py3-yaml cmake git
+
+mkdir -p /tmp/pytorch
+
+git clone --recursive https://github.com/pytorch/pytorch /tmp/pytorch
+
+cd /tmp/pytorch
+
+python3 setup.py install
+
+rm -rf /tmp/*

+ 54 - 0
container/src/shell/learning/install/tensorflow.sh

@@ -0,0 +1,54 @@
+#!/usr/bin/env sh
+set -e
+
+#apk add build-base python3-dev libc6-compat
+
+#curl -O https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.5.0rc1-cp36-cp36m-linux_x86_64.whl
+
+#pip3 install tensorflow-1.5.0rc1-cp36-cp36m-linux_x86_64.whl
+
+# 必须重新编译了
+export JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
+export LOCAL_RESOURCES=2048,.5,1.0
+
+export BAZEL_VERSION=0.7.0
+export TENSORFLOW_VERSION=1.4.0
+
+apk add --no-cache python3-tkinter imagemagick graphviz
+apk add --no-cache --virtual=.build-deps bash cmake curl freetype-dev g++ libjpeg-turbo-dev libpng-dev linux-headers makemusl-dev openblas-dev openjdk8 patch perl python3-dev py-numpy-dev rsync sed swig zip
+cd /tmp
+pip3 install --no-cache-dir wheel
+curl -SLO https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-dist.zip
+mkdir bazel-${BAZEL_VERSION}
+unzip -qd bazel-${BAZEL_VERSION} bazel-${BAZEL_VERSION}-dist.zip
+cd bazel-${BAZEL_VERSION}
+sed -i -e '/"-std=c++0x"/{h;s//"-fpermissive"/;x;G}' tools/cpp/cc_configure.bzl
+sed -i -e '/#endif /\/ COMPILER_MSVC/{h;s//#else/;G;s//#include <sys\/stat.h>/;G;}' third_party/ijar/common.h
+bash compile.sh
+cp -p output/bazel /usr/bin/
+cd /tmp
+curl -SL https://github.com/tensorflow/tensorflow/archive/v${TENSORFLOW_VERSION}.tar.gz | tar xzf -
+cd tensorflow-${TENSORFLOW_VERSION}
+sed -i -e '/JEMALLOC_HAVE_SECURE_GETENV/d' third_party/jemalloc.BUILD
+PYTHON_BIN_PATH=/usr/bin/python3
+PYTHON_LIB_PATH=/usr/lib/python3.6/site-packages
+CC_OPT_FLAGS="-march=native"
+TF_NEED_JEMALLOC=1
+TF_NEED_GCP=0
+TF_NEED_HDFS=0
+TF_NEED_S3=0
+TF_ENABLE_XLA=0
+TF_NEED_GDR=0
+TF_NEED_VERBS=0
+TF_NEED_OPENCL=0
+TF_NEED_CUDA=0
+TF_NEED_MPI=0
+bash configure
+bazel build -c opt --local_resources ${LOCAL_RESOURCES} //tensorflow/tools/pip_package:build_pip_package
+./bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
+cd
+pip3 install --no-cache-dir /tmp/tensorflow_pkg/tensorflow-${TENSORFLOW_VERSION}-cp36-cp36m-linux_x86_64.whl
+pip3 install --no-cache-dir google-api-python-client
+apk del .build-deps
+rm -f /usr/bin/bazel
+rm -rf /tmp/* /root/.cache

+ 16 - 0
container/src/shell/learning/install/xvfb.sh

@@ -0,0 +1,16 @@
+#!/usr/bin/env sh
+set -e
+
+export GECKODRIVER_VERSION=0.15.0
+export GECKODRIVER_FILE=v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz
+export OPENCV_VERSION=3.3.0
+apk add --no-cache bash curl dbus firefox-esr fontconfig ttf-freefont xvfb
+pip3 install pyvirtualdisplay
+pip3 install selenium
+curl -s -o /tmp/geckodriver.tar.gz -L https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_FILE
+rm -rf /usr/bin/geckodriver
+tar -C /usr/bin -zxf /tmp/geckodriver.tar.gz
+rm /tmp/geckodriver.tar.gz
+mv /usr/bin/geckodriver /usr/bin/geckodriver-$GECKODRIVER_VERSION
+chmod 755 /usr/bin/geckodriver-$GECKODRIVER_VERSION
+ln -fs /usr/bin/geckodriver-$GECKODRIVER_VERSION /usr/bin/geckodriver

+ 4 - 0
container/src/shell/learning/show/.ipynb_checkpoints/cpu-checkpoint.sh

@@ -0,0 +1,4 @@
+#!/usr/bin/env sh
+set -e
+
+cat /proc/cpuinfo

+ 4 - 0
container/src/shell/learning/show/cpu.sh

@@ -0,0 +1,4 @@
+#!/usr/bin/env sh
+set -e
+
+cat /proc/cpuinfo