| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e7f7dc5 commit 92d3aa1
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -63,11 +63,12 @@ RUN apt-get install -y python-software-properties zip && \ | |||
| 63 | 63 | echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list && \ | |
| 64 | 64 | curl https://bazel.build/bazel-release.pub.gpg | apt-key add - && \ | |
| 65 | 65 | apt-get update && apt-get install -y bazel && apt-get upgrade -y bazel && \ | |
| 66 | - cd /usr/local/src && git clone https://github.com/tensorflow/tensorflow && \ | ||
| 67 | - cd tensorflow && echo "\n" | ./configure && \ | ||
| 68 | - bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package && \ | ||
| 69 | - bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg && \ | ||
| 70 | - pip install /tmp/tensorflow_pkg/tensorflow*.whl | ||
| 66 | + pip install tensorflow | ||
| 67 | + #cd /usr/local/src && git clone https://github.com/tensorflow/tensorflow && \ | ||
| 68 | + #cd tensorflow && echo "\n" | ./configure && \ | ||
| 69 | + #bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package && \ | ||
| 70 | + #bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg && \ | ||
| 71 | + #pip install /tmp/tensorflow_pkg/tensorflow*.whl | ||
| 71 | 72 | ||
| 72 | 73 | RUN apt-get install -y libfreetype6-dev && \ | |
| 73 | 74 | apt-get install -y libglib2.0-0 libxext6 libsm6 libxrender1 libfontconfig1 --fix-missing && \ | |
@@ -366,8 +367,9 @@ RUN pip install --upgrade mpld3 && \ | |||
| 366 | 367 | pip install lime && \ | |
| 367 | 368 | pip install memory_profiler | |
| 368 | 369 | ||
| 369 | - # Temp fix for pyfasttext (cysignals 1.7.0 causes build to fail) | ||
| 370 | - RUN pip install --upgrade cysignals==1.6.9 && \ | ||
| 370 | + # install cython & cysignals before pyfasttext | ||
| 371 | + RUN pip install --upgrade cython && \ | ||
| 372 | + pip install --upgrade cysignals && \ | ||
| 371 | 373 | pip install pyfasttext && \ | |
| 372 | 374 | pip install ktext && \ | |
| 373 | 375 | cd /usr/local/src && git clone --depth=1 https://github.com/facebookresearch/fastText.git && cd fastText && pip install . && \ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -55,24 +55,27 @@ | |||
| 55 | 55 | import theano | |
| 56 | 56 | print("Theano ok") | |
| 57 | 57 | ||
| 58 | - from keras.models import Sequential | ||
| 59 | - from keras.layers.core import Dense, Dropout, Activation, Flatten | ||
| 60 | - from keras.layers.convolutional import Convolution2D, MaxPooling2D | ||
| 61 | - from keras.optimizers import SGD | ||
| 62 | - print("keras ok") | ||
| 63 | - | ||
| 64 | 58 | import nltk | |
| 65 | 59 | from nltk.stem import WordNetLemmatizer | |
| 66 | 60 | print("nltk ok") | |
| 67 | 61 | ||
| 62 | + import cv2 | ||
| 63 | + img = cv2.imread('plot1.png',0) | ||
| 64 | + print("OpenCV ok") | ||
| 65 | + | ||
| 68 | 66 | import tensorflow as tf | |
| 67 | + print(tf.__version__) | ||
| 69 | 68 | hello = tf.constant('TensorFlow ok') | |
| 70 | 69 | sess = tf.Session() | |
| 71 | 70 | print(sess.run(hello)) | |
| 71 | + print("Tensorflow ok") | ||
| 72 | + | ||
| 73 | + from keras.models import Sequential | ||
| 74 | + from keras.layers.core import Dense, Dropout, Activation, Flatten | ||
| 75 | + from keras.layers.convolutional import Convolution2D, MaxPooling2D | ||
| 76 | + from keras.optimizers import SGD | ||
| 77 | + print("Keras ok") | ||
| 72 | 78 | ||
| 73 | - import cv2 | ||
| 74 | - img = cv2.imread('plot1.png',0) | ||
| 75 | - print("OpenCV ok") | ||
| 76 | 79 | ||
| 77 | 80 | from skimage.io import imread | |
| 78 | 81 | print("skimage ok") | |
@@ -110,18 +113,16 @@ | |||
| 110 | 113 | from fastai.io import get_data | |
| 111 | 114 | print("fast.ai ok") | |
| 112 | 115 | ||
| 116 | + # Test BigQuery | ||
| 113 | 117 | import os | |
| 114 | 118 | import threading | |
| 115 | 119 | from http.server import BaseHTTPRequestHandler, HTTPServer | |
| 116 | 120 | from google.cloud import bigquery | |
| 117 | - | ||
| 118 | 121 | HOSTNAME = "127.0.0.1" | |
| 119 | 122 | PORT = 8000 | |
| 120 | 123 | URL = "http://%s:%s" % (HOSTNAME, PORT) | |
| 121 | - | ||
| 122 | 124 | fake_bq_called = False | |
| 123 | 125 | fake_bq_header_found = False | |
| 124 | - | ||
| 125 | 126 | class HTTPHandler(BaseHTTPRequestHandler): | |
| 126 | 127 | def do_HEAD(s): | |
| 127 | 128 | s.send_response(200) | |
@@ -135,18 +136,13 @@ def do_GET(s): | |||
| 135 | 136 | ||
| 136 | 137 | httpd = HTTPServer((HOSTNAME, PORT), HTTPHandler) | |
| 137 | 138 | threading.Thread(target=httpd.serve_forever).start() | |
| 138 | - | ||
| 139 | 139 | client = bigquery.Client() | |
| 140 | - | ||
| 141 | 140 | try: | |
| 142 | 141 | for ds in client.list_datasets(): pass | |
| 143 | 142 | except: | |
| 144 | 143 | pass | |
| 145 | - | ||
| 146 | 144 | httpd.shutdown() | |
| 147 | - | ||
| 148 | 145 | assert fake_bq_called, "Fake server did not recieve a request from the BQ client." | |
| 149 | 146 | assert fake_bq_header_found, "X-KAGGLE-PROXY-DATA header was missing from the BQ request." | |
| 150 | - | ||
| 151 | 147 | print("bigquery proxy ok") | |
| 152 | 148 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments