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

Commit 68a7dc5

Browse files
committed
update to 1.0.1
1 parent b463fb1 commit 68a7dc5

File tree

4 files changed

+75
-96
lines changed

4 files changed

+75
-96
lines changed

Dockerfile

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

3-
FROM ubuntu:16.04
4-
3+
FROM julia:1.0.1
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(\"IJulia\")" && \
24+
# Make sure Jupyter won't try to migrate old settings
25+
mkdir -p /root/.jupyter/kernels && \
26+
cp -r /root/.local/share/jupyter/kernels/julia-1.0 /root/.jupyter/kernels && \
27+
touch /root/.jupyter/jupyter_nbconvert_config.py && touch /root/.jupyter/migrated
28+
29+
# TensorFlow
30+
RUN pip3 install tensorflow && \
31+
julia -e "using Pkg;Pkg.add(\"TensorFlow\")"
32+
33+
RUN julia -e "using Pkg;Pkg.status()"
34+
35+
RUN julia /tmp/test_build.jl
4136

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\")" && \
37+
RUN julia -e "Base.compilecache(Base.identify_package(\"BinDeps\"))" && \
38+
julia -e "Base.compilecache(Base.identify_package(\"Cairo\"))" && \
39+
julia -e "Base.compilecache(Base.identify_package(\"Calculus\"))" && \
40+
julia -e "Base.compilecache(Base.identify_package(\"Clustering\"))" && \
41+
julia -e "Base.compilecache(Base.identify_package(\"Compose\"))" && \
42+
# https://github.com/JuliaStats/DataArrays.jl/pull/304
43+
# julia -e "Base.compilecache(Base.identify_package(\"DataArrays\"))" && \
44+
julia -e "Base.compilecache(Base.identify_package(\"DataFrames\"))" && \
45+
julia -e "Base.compilecache(Base.identify_package(\"DataFramesMeta\"))" && \
46+
julia -e "Base.compilecache(Base.identify_package(\"DecisionTree\"))" && \
47+
julia -e "Base.compilecache(Base.identify_package(\"Distributions\"))" && \
48+
julia -e "Base.compilecache(Base.identify_package(\"Distances\"))" && \
49+
# https://github.com/GiovineItalia/Gadfly.jl/pull/1189 waint for new release
50+
# julia -e "Base.compilecache(Base.identify_package(\"Gadfly\"))" && \
51+
julia -e "Base.compilecache(Base.identify_package(\"GLM\"))" && \
52+
julia -e "Base.compilecache(Base.identify_package(\"HDF5\"))" && \
53+
julia -e "Base.compilecache(Base.identify_package(\"HypothesisTests\"))" && \
54+
julia -e "Base.compilecache(Base.identify_package(\"IJulia\"))" && \
55+
julia -e "Base.compilecache(Base.identify_package(\"JSON\"))" && \
56+
julia -e "Base.compilecache(Base.identify_package(\"KernelDensity\"))" && \
57+
julia -e "Base.compilecache(Base.identify_package(\"Loess\"))" && \
58+
julia -e "Base.compilecache(Base.identify_package(\"MLBase\"))" && \
59+
julia -e "Base.compilecache(Base.identify_package(\"MultivariateStats\"))" && \
60+
# https://github.com/JuliaStats/NMF.jl/pull/24
61+
# julia -e "Base.compilecache(Base.identify_package(\"NMF\"))" && \
62+
julia -e "Base.compilecache(Base.identify_package(\"Optim\"))" && \
63+
julia -e "Base.compilecache(Base.identify_package(\"PDMats\"))" && \
64+
julia -e "Base.compilecache(Base.identify_package(\"RDatasets\"))" && \
65+
julia -e "Base.compilecache(Base.identify_package(\"SQLite\"))" && \
66+
julia -e "Base.compilecache(Base.identify_package(\"StatsBase\"))" && \
67+
julia -e "Base.compilecache(Base.identify_package(\"TensorFlow\"))" && \
68+
julia -e "Base.compilecache(Base.identify_package(\"TextAnalysis\"))" && \
69+
julia -e "Base.compilecache(Base.identify_package(\"TimeSeries\"))" && \
70+
julia -e "Base.compilecache(Base.identify_package(\"Turing\"))" && \
71+
julia -e "Base.compilecache(Base.identify_package(\"ZipFile\"))" && \
72+
julia -e "Base.compilecache(Base.identify_package(\"ZMQ\"))" && \
7573
julia -e "using IJulia"
7674

7775
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.1
1010
docker build --rm --no-cache -t kaggle/julia-build .
1111
fi
1212

package_installs.jl

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1+
using Pkg
2+
Pkg.update()
3+
14
metadata_packages = [
25
"BinDeps",
3-
"Bootstrap",
46
"Cairo",
57
"Calculus",
68
"Clustering",
9+
"Compose",
10+
"Conda",
711
"CSV",
8-
"DataArrays",
12+
# "DataArrays",
913
"DataFrames",
1014
"DataFramesMeta",
11-
"DataStreams",
12-
"Dates",
1315
"DecisionTree",
1416
"Distributions",
1517
"Distances",
1618
"Feather",
1719
"Flux",
18-
"Gadfly",
20+
# "Gadfly",
1921
"GLM",
2022
"GR",
2123
"HDF5",
2224
"HypothesisTests",
2325
"JSON",
2426
"JLD2",
2527
"KernelDensity",
26-
"Klara",
27-
"Mamba",
28-
"ManifoldLearning",
2928
"MLBase",
3029
"MultivariateStats",
31-
"NMF",
30+
"Loess",
31+
# "NMF",
3232
"OnlineStats",
3333
"Optim",
3434
"Pandas",
@@ -39,30 +39,12 @@ metadata_packages = [
3939
"RDatasets",
4040
"SQLite",
4141
"StatsBase",
42-
"TensorFlow",
4342
"TextAnalysis",
4443
"TSne",
4544
"Turing",
4645
"TimeSeries",
4746
"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"
47+
"ZipFile",
48+
"ZMQ"]
6749

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

test_build.jl

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

0 commit comments

Comments
 (0)