https://gist.github.com/sub-mod/18c23839ccbac660de08ba5f6033defd
#FROM centos:7
FROM nvidia/cuda:9.0-cudnn7-devel-centos7
"""This file contains some basic model components""" | |
import tensorflow as tf | |
from tensorflow.python.ops.rnn_cell import DropoutWrapper | |
from tensorflow.python.ops import variable_scope as vs | |
from tensorflow.python.ops import rnn_cell | |
from operator import mul | |
class LSTMEncoder(object): |
need to install bazel | |
https://copr.fedorainfracloud.org/coprs/vbatts/bazel/ | |
oc new-app --template=tensorflow-build-image --param=APPLICATION_NAME=tf-fedora27-builder-image-36 --param=S2I_IMAGE=registry.fedoraproject.org/f27/s2i-core --param=DOCKER_FILE_PATH=Dockerfile.fedora27 --param=NB_PYTHON_VER=3.6 --param=VERSION=4 | |
oc new-app --template=tensorflow-build-job --param=APPLICATION_NAME=tf-build-fc27-363 --param=BUILDER_IMAGESTREAM=docker-registry.default.svc:5000/dh-prod-analytics-factory/tf-fedora27-builder-image-36:3 --param=NB_PYTHON_VER=3.6 --param=GIT_TOKEN= --param=CUSTOM_BUILD="gcc -march=native -Q --help=target|grep march && gcc -march=native -E -v - </dev/null 2>&1 | grep cc1 && grep flags -m1 /proc/cpuinfo | cut -d ":" -f 2 | tr '[:upper:]' '[:lower:]' && lscpu && bazel build -c opt --copt='-march=core-avx2' --cxxopt='-D_GLIBCXX_USE_CXX11_ABI=0' --local_resources 2048,2.0,1.0 --verbose_failures //tensorflow/tools/pip_package:build_pip_package" | |
gcc -march=native -Q --help=target|grep marc |
https://gist.github.com/sub-mod/18c23839ccbac660de08ba5f6033defd
#FROM centos:7
FROM nvidia/cuda:9.0-cudnn7-devel-centos7
from openshift.dynamic import DynamicClient | |
from kubernetes.client import Configuration, ApiClient | |
from kubernetes.config.incluster_config import InClusterConfigLoader | |
import urllib3 | |
def load_incluster_config(environ): | |
"""Use the service account kubernetes gives to pods to connect to kubernetes | |
cluster. It's intended for clients that expect to be running inside a pod |
#set root password if not set | |
sudo passwd | |
sudo yum update -y | |
sudo vi /etc/ssh/sshd_config | |
Make sure below 2 lines exists with yes | |
PermitEmptyPasswords yes | |
PasswordAuthentication yes |
$ docker version | |
Client: Docker Engine - Community | |
Version: 18.09.1 | |
API version: 1.39 | |
Go version: go1.10.6 | |
Git commit: 4c52b90 | |
Built: Wed Jan 9 19:33:12 2019 | |
OS/Arch: darwin/amd64 | |
Experimental: false |
/Volumes/Samsung_T5/development/TEST_SSD$ time git clone https://github.com/openshift/origin.git
Cloning into 'origin'...
remote: Enumerating objects: 53, done.
remote: Counting objects: 100% (53/53), done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 533223 (delta 7), reused 9 (delta 4), pack-reused 533170
Receiving objects: 100% (533223/533223), 976.50 MiB | 9.93 MiB/s, done.
Resolving deltas: 100% (339788/339788), done.
Checking connectivity... done.
bash-4.1# auditwheel show tensorflow-gpu-1.13.1-cp | |
tensorflow-gpu-1.13.1-cp27-none-linux_x86_64.whl tensorflow-gpu-1.13.1-cp36-cp36m-linux_x86_64.whl | |
bash-4.1# auditwheel show tensorflow-gpu-1.13.1-cp36-cp36m-linux_x86_64.whl | |
tensorflow-gpu-1.13.1-cp36-cp36m-linux_x86_64.whl is consistent with | |
the following platform tag: "linux_x86_64". | |
The wheel references external versioned symbols in these system- | |
provided shared libraries: librt.so.1 with versions {'GLIBC_2.2.5'}, | |
libgcc_s.so.1 with versions {'GCC_3.0'}, libcudart.so.10.0 with |
diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl | |
index d93e0df..8825820 100644 | |
--- a/tensorflow/tensorflow.bzl | |
+++ b/tensorflow/tensorflow.bzl | |
@@ -377,7 +377,7 @@ def tf_cc_shared_object( | |
srcs = [], | |
deps = [], | |
data = [], | |
- linkopts = [], | |
+ linkopts = ['-lrt'], |