Skip to content
This repository was archived by the owner on Nov 4, 2022. It is now read-only.

Commit 782169c

Browse files
committed
update to 1.0.0
1 parent b463fb1 commit 782169c

File tree

4 files changed

+85
-91
lines changed

4 files changed

+85
-91
lines changed

Dockerfile

Lines changed: 70 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,84 @@
11
# kaggle/julia dockerfile
22

3-
FROM ubuntu:16.04
4-
3+
FROM julia:1.0.0
54

65
ADD package_installs.jl /tmp/package_installs.jl
6+
ADD test_build.jl /tmp/test_build.jl
7+
8+
RUN apt-get update && \
9+
apt-get install -y build-essential gettext git hdf5-tools libcairo2 libpango1.0-0 python3 python3-dev python3-pip
10+
11+
# Pycall
12+
ENV PYTHON /usr/bin/python3
713

8-
RUN apt-get update && \
9-
apt-get install git software-properties-common curl wget libcairo2 libpango1.0-0 -y && \
10-
add-apt-repository ppa:staticfloat/julia-deps -y && \
11-
apt-get update -y && \
12-
apt-get install -y libpcre3-dev build-essential && \
13-
apt-get install -y gettext hdf5-tools && \
14-
apt-get install -y gfortran python && \
15-
apt-get install -y m4 cmake libssl-dev && \
16-
cd /usr/local/src && git clone https://github.com/JuliaLang/julia.git && \
17-
cd julia && git checkout v0.6.2 && \
18-
# Use generic instruction set; see https://github.com/JuliaLang/julia/pull/6220
19-
# and https://groups.google.com/forum/#!topic/julia-dev/Eqp0GhZWxME
20-
echo "JULIA_CPU_TARGET=core2" > Make.user && \
21-
echo "OPENBLAS_TARGET_ARCH=NEHALEM" > Make.user && \
22-
make -j 4 julia-deps && make -j 4 && make install && \
23-
ln -s /usr/local/src/julia/julia /usr/local/bin/julia
14+
# Conda
15+
ENV CONDA_JL_VERSION 3
2416

25-
ENV JULIA_PKGDIR /root/.julia/v0.6
17+
ENV JULIA_PKGDIR /root/.julia/
2618

2719
RUN julia /tmp/package_installs.jl
2820

2921
# IJulia
30-
RUN apt-get update && apt-get install -y python3-pip python3-dev && pip3 install jupyter && \
31-
julia -e "Pkg.add(\"Nettle\")" && \
32-
julia -e "Pkg.add(\"IJulia\")" && \
33-
julia -e "Pkg.build(\"IJulia\")" && \
34-
# Make sure Jupyter won't try to migrate old settings
35-
mkdir -p /root/.jupyter/kernels && \
36-
cp -r /root/.local/share/jupyter/kernels/julia-0.6 /root/.jupyter/kernels && \
37-
touch /root/.jupyter/jupyter_nbconvert_config.py && touch /root/.jupyter/migrated && \
38-
julia -e "Base.compilecache(\"IJulia\")" && \
39-
julia -e "Base.compilecache(\"ZMQ\")" && \
40-
julia -e "Base.compilecache(\"Nettle\")"
22+
RUN pip3 install jupyter && \
23+
julia -e "using Pkg;Pkg.add(\"Nettle\")" && \
24+
julia -e "using Pkg;Pkg.add(\"IJulia\")" && \
25+
# Make sure Jupyter won't try to migrate old settings
26+
mkdir -p /root/.jupyter/kernels && \
27+
cp -r /root/.local/share/jupyter/kernels/julia-1.0 /root/.jupyter/kernels && \
28+
touch /root/.jupyter/jupyter_nbconvert_config.py && touch /root/.jupyter/migrated
29+
30+
# TensorFlow
31+
RUN pip3 install tensorflow && \
32+
julia -e "using Pkg;Pkg.add(\"TensorFlow\")"
33+
34+
RUN julia -e "using Pkg;Pkg.status()"
35+
36+
RUN julia /tmp/test_build.jl
4137

42-
RUN julia -e "Base.compilecache(\"BinDeps\")" && \
43-
julia -e "Base.compilecache(\"Cairo\")" && \
44-
julia -e "Base.compilecache(\"Calculus\")" && \
45-
julia -e "Base.compilecache(\"Clustering\")" && \
46-
julia -e "Base.compilecache(\"Compose\")" && \
47-
julia -e "Base.compilecache(\"DataArrays\")" && \
48-
julia -e "Base.compilecache(\"DataFrames\")" && \
49-
julia -e "Base.compilecache(\"DataFramesMeta\")" && \
50-
julia -e "Base.compilecache(\"Dates\")" && \
51-
julia -e "Base.compilecache(\"DecisionTree\")" && \
52-
julia -e "Base.compilecache(\"Distributions\")" && \
53-
julia -e "Base.compilecache(\"Distances\")" && \
54-
julia -e "Base.compilecache(\"GLM\")" && \
55-
julia -e "Base.compilecache(\"HDF5\")" && \
56-
julia -e "Base.compilecache(\"HypothesisTests\")" && \
57-
julia -e "Base.compilecache(\"JSON\")" && \
58-
julia -e "Base.compilecache(\"KernelDensity\")" && \
59-
julia -e "Base.compilecache(\"Loess\")" && \
60-
#julia -e "Base.compilecache(\"Lora\")" && \
61-
julia -e "Base.compilecache(\"MLBase\")" && \
62-
julia -e "Base.compilecache(\"MultivariateStats\")" && \
63-
julia -e "Base.compilecache(\"NMF\")" && \
64-
julia -e "Base.compilecache(\"Optim\")" && \
65-
julia -e "Base.compilecache(\"PDMats\")" && \
66-
julia -e "Base.compilecache(\"RDatasets\")" && \
67-
julia -e "Base.compilecache(\"SQLite\")" && \
68-
julia -e "Base.compilecache(\"StatsBase\")" && \
69-
julia -e "Base.compilecache(\"TextAnalysis\")" && \
70-
julia -e "Base.compilecache(\"TimeSeries\")" && \
71-
julia -e "Base.compilecache(\"ZipFile\")" && \
72-
julia -e "Base.compilecache(\"Gadfly\")" && \
73-
julia -e "Base.compilecache(\"MLBase\")" && \
74-
julia -e "Base.compilecache(\"Clustering\")" && \
38+
RUN julia -e "Base.compilecache(Base.identify_package(\"BinDeps\"))" && \
39+
julia -e "Base.compilecache(Base.identify_package(\"Cairo\"))" && \
40+
julia -e "Base.compilecache(Base.identify_package(\"Calculus\"))" && \
41+
julia -e "Base.compilecache(Base.identify_package(\"Clustering\"))" && \
42+
# https://github.com/GiovineItalia/Compose.jl/pull/282
43+
# julia -e "Base.compilecache(Base.identify_package(\"Compose\"))" && \
44+
# https://github.com/JuliaStats/DataArrays.jl/pull/304
45+
# julia -e "Base.compilecache(Base.identify_package(\"DataArrays\"))" && \
46+
julia -e "Base.compilecache(Base.identify_package(\"DataFrames\"))" && \
47+
julia -e "Base.compilecache(Base.identify_package(\"DataFramesMeta\"))" && \
48+
julia -e "Base.compilecache(Base.identify_package(\"DecisionTree\"))" && \
49+
julia -e "Base.compilecache(Base.identify_package(\"Distributions\"))" && \
50+
julia -e "Base.compilecache(Base.identify_package(\"Distances\"))" && \
51+
# https://github.com/GiovineItalia/Gadfly.jl/issues/1158
52+
# julia -e "Base.compilecache(Base.identify_package(\"Gadfly\"))" && \
53+
# https://github.com/JuliaStats/GLM.jl/pull/242
54+
# julia -e "Base.compilecache(Base.identify_package(\"GLM\"))" && \
55+
julia -e "Base.compilecache(Base.identify_package(\"HDF5\"))" && \
56+
julia -e "Base.compilecache(Base.identify_package(\"HypothesisTests\"))" && \
57+
julia -e "Base.compilecache(Base.identify_package(\"IJulia\"))" && \
58+
julia -e "Base.compilecache(Base.identify_package(\"JSON\"))" && \
59+
julia -e "Base.compilecache(Base.identify_package(\"KernelDensity\"))" && \
60+
julia -e "Base.compilecache(Base.identify_package(\"Loess\"))" && \
61+
# https://github.com/JuliaStats/MLBase.jl/pull/45
62+
# julia -e "Base.compilecache(Base.identify_package(\"MLBase\"))" && \
63+
# https://github.com/JuliaStats/MultivariateStats.jl/issues/69 wait for new release
64+
# julia -e "Base.compilecache(Base.identify_package(\"MultivariateStats\"))" && \
65+
julia -e "Base.compilecache(Base.identify_package(\"Nettle\"))" && \
66+
# https://github.com/JuliaStats/NMF.jl/pull/24/files
67+
# julia -e "Base.compilecache(Base.identify_package(\"NMF\"))" && \
68+
julia -e "Base.compilecache(Base.identify_package(\"Optim\"))" && \
69+
julia -e "Base.compilecache(Base.identify_package(\"PDMats\"))" && \
70+
julia -e "Base.compilecache(Base.identify_package(\"RDatasets\"))" && \
71+
julia -e "Base.compilecache(Base.identify_package(\"SQLite\"))" && \
72+
julia -e "Base.compilecache(Base.identify_package(\"StatsBase\"))" && \
73+
julia -e "Base.compilecache(Base.identify_package(\"TensorFlow\"))" && \
74+
# https://github.com/JuliaText/TextAnalysis.jl/releases
75+
# julia -e "Base.compilecache(Base.identify_package(\"TextAnalysis\"))" && \
76+
# https://github.com/JuliaStats/TimeSeries.jl/pull/370
77+
# julia -e "Base.compilecache(Base.identify_package(\"TimeSeries\"))" && \
78+
# https://github.com/TuringLang/Turing.jl/pull/469
79+
# julia -e "Base.compilecache(Base.identify_package(\"Turing\"))" && \
80+
julia -e "Base.compilecache(Base.identify_package(\"ZipFile\"))" && \
81+
julia -e "Base.compilecache(Base.identify_package(\"ZMQ\"))" && \
7582
julia -e "using IJulia"
7683

7784
CMD ["julia"]

build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -e
66
if [[ "$1" == "--use-cache" ]]; then
77
docker build --rm -t kaggle/julia-build .
88
else
9-
docker pull ubuntu:16.04
9+
docker pull julia:1.0.0
1010
docker build --rm --no-cache -t kaggle/julia-build .
1111
fi
1212

package_installs.jl

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1+
using Pkg
2+
Pkg.update()
3+
14
metadata_packages = [
25
"BinDeps",
36
"Bootstrap",
47
"Cairo",
58
"Calculus",
69
"Clustering",
10+
"Compose",
11+
"Conda",
712
"CSV",
813
"DataArrays",
914
"DataFrames",
1015
"DataFramesMeta",
11-
"DataStreams",
12-
"Dates",
1316
"DecisionTree",
1417
"Distributions",
1518
"Distances",
@@ -28,6 +31,7 @@ metadata_packages = [
2831
"ManifoldLearning",
2932
"MLBase",
3033
"MultivariateStats",
34+
"Loess",
3135
"NMF",
3236
"OnlineStats",
3337
"Optim",
@@ -39,30 +43,13 @@ metadata_packages = [
3943
"RDatasets",
4044
"SQLite",
4145
"StatsBase",
42-
"TensorFlow",
4346
"TextAnalysis",
4447
"TSne",
45-
"Turing",
48+
# "Turing",
4649
"TimeSeries",
4750
"Query",
48-
"ZipFile"]
49-
50-
51-
Pkg.init()
52-
Pkg.update()
53-
54-
for package=metadata_packages
55-
Pkg.add(package)
56-
end
57-
58-
# need to build XGBoost version for it to work
59-
Pkg.clone("https://github.com/antinucleon/XGBoost.jl.git")
60-
Pkg.build("XGBoost")
61-
62-
Pkg.clone("https://github.com/benhamner/MachineLearning.jl")
63-
Pkg.pin("MachineLearning")
64-
65-
Pkg.clone("https://github.com/Allardvm/LightGBM.jl.git")
66-
ENV["LIGHTGBM_PATH"] = "../LightGBM"
51+
# "XGBoost",
52+
"ZipFile",
53+
"ZMQ"]
6754

68-
Pkg.resolve()
55+
Pkg.add(metadata_packages)

test_build.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
println("Starting...")
22
using DataFrames
3-
using Gadfly
4-
using TextAnalysis
3+
# using Gadfly
4+
# using TextAnalysis
55
using IJulia
66
using SQLite
7-
using XGBoost
7+
# using XGBoost
88
println("Ok!")

0 commit comments

Comments
 (0)