FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge branch 'master' into master · RoyMachineLearning/docker-python@b9c83ea · GitHub

Commit b9c83ea

Browse files
Nathaniel Saul
authored
Merge branch 'master' into master
2 parents f76cb37 + 9673bcc commit b9c83ea

2 files changed

Lines changed: 53 additions & 39 deletions

File tree

‎Dockerfile‎

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,27 @@ RUN pip install opencv-python
5353
#rm -rf /root/.cache/pip/* && \
5454
#apt-get autoremove -y && apt-get clean
5555

56-
# Tensorflow source build
57-
RUN apt-get install -y python-software-properties zip && \
58-
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list && echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 C857C906 2B90D010 && \
56+
RUN apt-get update && apt-get install -y python-software-properties zip && \
57+
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list && \
58+
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list && \
59+
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 C857C906 2B90D010 && \
5960
apt-get update && \
6061
echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
6162
echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections && \
6263
apt-get install -y oracle-java8-installer && \
6364
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list && \
6465
curl https://bazel.build/bazel-release.pub.gpg | apt-key add - && \
65-
apt-get update && apt-get install -y bazel && apt-get upgrade -y bazel && \
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
66+
apt-get update && apt-get install -y bazel && \
67+
apt-get upgrade -y bazel
68+
69+
# Tensorflow source build
70+
RUN cd /usr/local/src && \
71+
git clone https://github.com/tensorflow/tensorflow && \
72+
cd tensorflow && \
73+
cat /dev/null | ./configure && \
74+
bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package && \
75+
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg && \
76+
pip install /tmp/tensorflow_pkg/tensorflow*.whl
7277

7378
RUN apt-get install -y libfreetype6-dev && \
7479
apt-get install -y libglib2.0-0 libxext6 libsm6 libxrender1 libfontconfig1 --fix-missing && \
@@ -215,6 +220,7 @@ RUN apt-get update && \
215220
pip install line_profiler && \
216221
pip install orderedmultidict && \
217222
pip install smhasher && \
223+
conda install -y -c bokeh bokeh && \
218224
conda install -y -c bokeh datashader && \
219225
# Boruta (python implementation)
220226
cd /usr/local/src && git clone https://github.com/danielhomola/boruta_py.git && \
@@ -477,10 +483,16 @@ RUN pip install flashtext && \
477483
pip install featuretools && \
478484
pip install -e git+https://github.com/SohierDane/BigQuery_Helper#egg=bq_helper && \
479485
pip install hpsklearn && \
486+
pip install keras-tqdm && \
480487
pip install git+https://github.com/Kaggle/learntools && \
481488
pip install kmapper && \
489+
pip install shap && \
482490
pip install ray && \
483-
##### ^^^^ Add new contributions above here
491+
492+
##### ^^^^ Add new contributions above here ^^^^ #####
493+
494+
495+
484496
# clean up pip cache
485497
rm -rf /root/.cache/pip/*
486498

‎test_build.py‎

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,33 @@
22
# kaggle/python container. It checks that all our most popular packages can
33
# be loaded and used without errors.
44

5+
import tensorflow as tf
6+
print(tf.__version__)
7+
hello = tf.constant('TensorFlow ok')
8+
sess = tf.Session()
9+
print(sess.run(hello))
10+
print("Tensorflow ok")
11+
12+
from keras.models import Sequential
13+
from keras.layers.core import Dense, Dropout, Activation, Flatten
14+
from keras.layers.convolutional import Convolution2D, MaxPooling2D
15+
from keras.optimizers import SGD
16+
print("Keras ok")
17+
18+
# PyTorch smoke test based on http://pytorch.org/tutorials/beginner/nlp/deep_learning_tutorial.html
19+
import torch
20+
import torch.nn as tnn
21+
import torch.autograd as autograd
22+
torch.manual_seed(31337)
23+
linear_torch = tnn.Linear(5,3)
24+
data_torch = autograd.Variable(torch.randn(2, 5))
25+
print(linear_torch(data_torch))
26+
print("PyTorch ok")
27+
28+
import fastai
29+
from fastai.io import get_data
30+
print("fast.ai ok")
31+
532
import numpy as np
633
print("Numpy imported ok")
734
print("Your lucky number is: " + str(np.random.randint(100)))
@@ -63,20 +90,6 @@
6390
img = cv2.imread('plot1.png',0)
6491
print("OpenCV ok")
6592

66-
import tensorflow as tf
67-
print(tf.__version__)
68-
hello = tf.constant('TensorFlow ok')
69-
sess = tf.Session()
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")
78-
79-
8093
from skimage.io import imread
8194
print("skimage ok")
8295

@@ -99,20 +112,6 @@
99112
import seaborn
100113
print("seaborn ok")
101114

102-
# PyTorch smoke test based on http://pytorch.org/tutorials/beginner/nlp/deep_learning_tutorial.html
103-
import torch
104-
import torch.nn as tnn
105-
import torch.autograd as autograd
106-
torch.manual_seed(31337)
107-
linear_torch = tnn.Linear(5,3)
108-
data_torch = autograd.Variable(torch.randn(2, 5))
109-
print(linear_torch(data_torch))
110-
print("PyTorch ok")
111-
112-
import fastai
113-
from fastai.io import get_data
114-
print("fast.ai ok")
115-
116115
# Test BigQuery
117116
import os
118117
import threading
@@ -146,3 +145,6 @@ def do_GET(s):
146145
assert fake_bq_header_found, "X-KAGGLE-PROXY-DATA header was missing from the BQ request."
147146
print("bigquery proxy ok")
148147

148+
import shap
149+
print("shap ok")
150+

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL