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

fix geopandas, pin vowpalwabbit, python3.6.6 · HadokenCode/docker-python@80fe4ad · GitHub

Commit 80fe4ad

Browse files
Chris Crawford
committed
fix geopandas, pin vowpalwabbit, python3.6.6
1 parent fe0f773 commit 80fe4ad

1 file changed

Lines changed: 32 additions & 44 deletions

File tree

‎Dockerfile‎

Lines changed: 32 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,21 @@ RUN sed -i "s/httpredir.debian.org/debian.uchicago.edu/" /etc/apt/sources.list &
1010
# https://stackoverflow.com/a/46498173
1111
conda update -y conda && conda update -y python && \
1212
pip install --upgrade pip && \
13-
apt-get -y install cmake && \
14-
# Vowpal Rabbit
15-
#apt-get install -y libboost-program-options-dev zlib1g-dev libboost-python-dev && \
16-
#cd /usr/lib/x86_64-linux-gnu/ && rm -f libboost_python.a && rm -f libboost_python.so && \
17-
#ln -sf libboost_python-py34.so libboost_python.so && ln -sf libboost_python-py34.a libboost_python.a && \
18-
#pip install vowpalwabbit && \
19-
# Anaconda's scipy is currently behind the main release (1.0)
20-
#pip install scipy --upgrade && \
21-
pip install seaborn python-dateutil dask pytagcloud pyyaml joblib \
13+
apt-get -y install cmake
14+
15+
RUN pip install seaborn python-dateutil dask pytagcloud pyyaml joblib \
2216
husl geopy ml_metrics mne pyshp gensim && \
2317
conda install -y -c conda-forge spacy && python -m spacy download en && \
2418
python -m spacy download en_core_web_lg && \
2519
# The apt-get version of imagemagick is out of date and has compatibility issues, so we build from source
2620
apt-get -y install dbus fontconfig fontconfig-config fonts-dejavu-core fonts-droid ghostscript gsfonts hicolor-icon-theme \
27-
libavahi-client3 libavahi-common-data libavahi-common3 libcairo2 libcap-ng0 libcroco3 \
28-
libcups2 libcupsfilters1 libcupsimage2 libdatrie1 libdbus-1-3 libdjvulibre-text libdjvulibre21 libfftw3-double3 libfontconfig1 \
29-
libfreetype6 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgomp1 libgraphite2-3 libgs9 libgs9-common libharfbuzz0b libijs-0.35 \
30-
libilmbase6 libjasper1 libjbig0 libjbig2dec0 libjpeg62-turbo liblcms2-2 liblqr-1-0 libltdl7 libmagickcore-6.q16-2 \
31-
libmagickcore-6.q16-2-extra libmagickwand-6.q16-2 libnetpbm10 libopenexr6 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 \
32-
libpaper-utils libpaper1 libpixman-1-0 libpng12-0 librsvg2-2 librsvg2-common libthai-data libthai0 libtiff5 libwmf0.2-7 \
33-
libxcb-render0 libxcb-shm0 netpbm poppler-data p7zip-full && \
21+
libavahi-client3 libavahi-common-data libavahi-common3 libcairo2 libcap-ng0 libcroco3 \
22+
libcups2 libcupsfilters1 libcupsimage2 libdatrie1 libdbus-1-3 libdjvulibre-text libdjvulibre21 libfftw3-double3 libfontconfig1 \
23+
libfreetype6 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgomp1 libgraphite2-3 libgs9 libgs9-common libharfbuzz0b libijs-0.35 \
24+
libilmbase6 libjasper1 libjbig0 libjbig2dec0 libjpeg62-turbo liblcms2-2 liblqr-1-0 libltdl7 libmagickcore-6.q16-2 \
25+
libmagickcore-6.q16-2-extra libmagickwand-6.q16-2 libnetpbm10 libopenexr6 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 \
26+
libpaper-utils libpaper1 libpixman-1-0 libpng12-0 librsvg2-2 librsvg2-common libthai-data libthai0 libtiff5 libwmf0.2-7 \
27+
libxcb-render0 libxcb-shm0 netpbm poppler-data p7zip-full && \
3428
cd /usr/local/src && \
3529
wget http://transloadit.imagemagick.org/download/ImageMagick.tar.gz && \
3630
tar xzf ImageMagick.tar.gz && cd `ls -d ImageMagick-*` && pwd && ls -al && ./configure && \
@@ -40,19 +34,6 @@ libxcb-render0 libxcb-shm0 netpbm poppler-data p7zip-full && \
4034

4135
# OpenCV install (from pip or source)
4236
RUN pip install opencv-python
43-
#apt-get -y install libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev && \
44-
#apt-get -y install libtbb2 libtbb-dev libjpeg-dev libtiff-dev libjasper-dev && \
45-
#cd /usr/local/src && git clone --depth 1 https://github.com/Itseez/opencv.git && \
46-
#cd opencv && \
47-
#mkdir build && cd build && \
48-
#cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_FFMPEG=OFF -D WITH_V4L=ON -D WITH_QT=OFF -D WITH_OPENGL=ON -D PYTHON3_LIBRARY=/opt/conda/lib/libpython3.6m.so -D PYTHON3_INCLUDE_DIR=/opt/conda/include/python3.6m/ -D PYTHON_LIBRARY=/opt/conda/lib/libpython3.6m.so -D PYTHON_INCLUDE_DIR=/opt/conda/include/python3.6m/ -D BUILD_PNG=TRUE .. && \
49-
#make -j $(nproc) && make install && \
50-
#echo "/usr/local/lib/python3.6/site-packages" > /etc/ld.so.conf.d/opencv.conf && ldconfig && \
51-
#cp /usr/local/lib/python3.6/site-packages/cv2.cpython-36m-x86_64-linux-gnu.so /opt/conda/lib/python3.6/site-packages/ && \
52-
# Clean up install cruft
53-
#rm -rf /usr/local/src/opencv && \
54-
#rm -rf /root/.cache/pip/* && \
55-
#apt-get autoremove -y && apt-get clean
5637

5738
RUN apt-get update && apt-get install -y python-software-properties zip && \
5839
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list && \
@@ -67,8 +48,11 @@ RUN apt-get update && apt-get install -y python-software-properties zip && \
6748
apt-get update && apt-get install -y bazel && \
6849
apt-get upgrade -y bazel
6950

70-
# Tensorflow source build
71-
RUN cd /usr/local/src && \
51+
# Tensorflow
52+
# Temp fixes: Downgrade python 3.7->3.6.6 and downgrade Pandas 0.23.3->0.23.2
53+
RUN conda install -y python=3.6.6 && \
54+
pip install pandas==0.23.2 && \
55+
cd /usr/local/src && \
7256
git clone https://github.com/tensorflow/tensorflow && \
7357
cd tensorflow && \
7458
cat /dev/null | ./configure && \
@@ -132,18 +116,18 @@ RUN apt-get install -y libfreetype6-dev && \
132116
# the corpuses that work
133117
python -m nltk.downloader -d /usr/share/nltk_data abc alpino averaged_perceptron_tagger \
134118
basque_grammars biocreative_ppi bllip_wsj_no_aux \
135-
book_grammars brown brown_tei cess_cat cess_esp chat80 city_database cmudict \
136-
comtrans conll2000 conll2002 conll2007 crubadan dependency_treebank \
137-
europarl_raw floresta gazetteers genesis gutenberg \
138-
ieer inaugural indian jeita kimmo knbc large_grammars lin_thesaurus mac_morpho machado \
139-
masc_tagged maxent_ne_chunker maxent_treebank_pos_tagger moses_sample movie_reviews \
140-
mte_teip5 names nps_chat omw opinion_lexicon paradigms \
141-
pil pl196x porter_test ppattach problem_reports product_reviews_1 product_reviews_2 propbank \
142-
pros_cons ptb punkt qc reuters rslp rte sample_grammars semcor senseval sentence_polarity \
143-
sentiwordnet shakespeare sinica_treebank smultron snowball_data spanish_grammars \
144-
state_union stopwords subjectivity swadesh switchboard tagsets timit toolbox treebank \
145-
twitter_samples udhr2 udhr unicode_samples universal_tagset universal_treebanks_v20 \
146-
vader_lexicon verbnet webtext word2vec_sample wordnet wordnet_ic words ycoe && \
119+
book_grammars brown brown_tei cess_cat cess_esp chat80 city_database cmudict \
120+
comtrans conll2000 conll2002 conll2007 crubadan dependency_treebank \
121+
europarl_raw floresta gazetteers genesis gutenberg \
122+
ieer inaugural indian jeita kimmo knbc large_grammars lin_thesaurus mac_morpho machado \
123+
masc_tagged maxent_ne_chunker maxent_treebank_pos_tagger moses_sample movie_reviews \
124+
mte_teip5 names nps_chat omw opinion_lexicon paradigms \
125+
pil pl196x porter_test ppattach problem_reports product_reviews_1 product_reviews_2 propbank \
126+
pros_cons ptb punkt qc reuters rslp rte sample_grammars semcor senseval sentence_polarity \
127+
sentiwordnet shakespeare sinica_treebank smultron snowball_data spanish_grammars \
128+
state_union stopwords subjectivity swadesh switchboard tagsets timit toolbox treebank \
129+
twitter_samples udhr2 udhr unicode_samples universal_tagset universal_treebanks_v20 \
130+
vader_lexicon verbnet webtext word2vec_sample wordnet wordnet_ic words ycoe && \
147131
# Stop-words
148132
pip install stop-words && \
149133
# clean up
@@ -339,6 +323,8 @@ RUN cd /usr/local/src && git clone https://github.com/iskandr/fancyimpute && \
339323
pip install stemming && \
340324
conda install -y -c conda-forge fbprophet && \
341325
conda install -y -c conda-forge -c ioam holoviews geoviews && \
326+
# Temp fix : Fiona is already installed by pip and conda installs another version as a dependency for holoviews
327+
conda uninstall -y fiona && \
342328
pip install hypertools && \
343329
# Nxviz has been causing an installation issue by trying unsuccessfully to remove setuptools.
344330
#pip install nxviz && \
@@ -488,6 +474,7 @@ RUN pip install bcolz && \
488474
# of all non-final lines. Thanks!
489475
#
490476
###########
477+
491478
RUN pip install flashtext && \
492479
pip install marisa-trie && \
493480
pip install pyemd && \
@@ -506,11 +493,12 @@ RUN pip install flashtext && \
506493
pip install conx && \
507494
pip install pandasql && \
508495
pip install trackml && \
509-
cd /usr/local/src && git clone https://github.com/JohnLangford/vowpal_wabbit.git && ./vowpal_wabbit/python/conda_install.sh && \
510496
##### ^^^^ Add new contributions above here ^^^^ #####
511497
# clean up pip cache
512498
rm -rf /root/.cache/pip/*
513499

500+
# Pin Vowpal Wabbit v8.6.0 because 8.6.1 does not build or install successfully
501+
RUN cd /usr/local/src && git clone -b 8.6.0 https://github.com/JohnLangford/vowpal_wabbit.git && ./vowpal_wabbit/python/conda_install.sh
514502

515503
# For Facets
516504
ENV PYTHONPATH=$PYTHONPATH:/opt/facets/facets_overview/python/

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL