<commit_before>FROM julia:0.5.1

RUN apt-get update && apt-get install -y bash curl git coreutils unzip build-essential cmake

RUN julia -e 'Pkg.add("DataFrames"); using DataFrames'
RUN julia -e 'Pkg.add("SHA"); using SHA'
RUN julia -e 'Pkg.add("Plots")'
RUN julia -e 'Pkg.add("Optim")'
RUN julia -e 'Pkg.add("DifferentialEquations")'
RUN julia -e 'Pkg.add("Calculus")'
RUN julia -e 'Pkg.add("Distributions")'
RUN julia -e 'Pkg.add("HypothesisTests")'
RUN julia -e 'Pkg.add("GLM")'

ARG PLOTLYJSJLTAG='a1846adfcf9b3ecf52a1ede7461d698983b808c4'

RUN julia -e 'Pkg.clone("https://github.com/nextjournal/PlotlyJS.jl.git")' && \
  PKG_DIR="$(julia -e 'print(Pkg.dir())')" && \
  cd "${PKG_DIR}/PlotlyJS" && \
  git checkout ${PLOTLYJSJLTAG} && \
  git checkout -b "${PLOTLYJSJLTAG}-branch" && \
  julia -e 'Pkg.checkout("PlotlyJS", ENV["PLOTLYJSJLTAG"] * "-branch", merge=false, pull=false)' && \
  julia -e 'using PlotlyJS'<commit_msg>Add import statement for each installed package to trigger precompile<commit_after>FROM julia:0.5.1

RUN apt-get update && apt-get install -y bash curl git coreutils unzip build-essential cmake

RUN julia -e 'Pkg.add("DataFrames"); using DataFrames'
RUN julia -e 'Pkg.add("SHA"); using SHA'
RUN julia -e 'Pkg.add("Plots")'
RUN julia -e 'Pkg.add("Optim")'
RUN julia -e 'Pkg.add("DifferentialEquations")'
RUN julia -e 'Pkg.add("Calculus")'
RUN julia -e 'Pkg.add("Distributions")'
RUN julia -e 'Pkg.add("HypothesisTests")'
RUN julia -e 'Pkg.add("GLM")'

ARG PLOTLYJSJLTAG='a1846adfcf9b3ecf52a1ede7461d698983b808c4'

RUN julia -e 'Pkg.clone("https://github.com/nextjournal/PlotlyJS.jl.git")' && \
  PKG_DIR="$(julia -e 'print(Pkg.dir())')" && \
  cd "${PKG_DIR}/PlotlyJS" && \
  git checkout ${PLOTLYJSJLTAG} && \
  git checkout -b "${PLOTLYJSJLTAG}-branch" && \
  julia -e 'Pkg.checkout("PlotlyJS", ENV["PLOTLYJSJLTAG"] * "-branch", merge=false, pull=false)'

RUN julia -e 'for pkg in keys(Pkg.installed()); try info("Compiling: $pkg"); eval(Expr(:toplevel, Expr(:using, Symbol(pkg)))); catch err warn("Unable to precompile: $pkg"); warn(err); end end'
{'fraction_non_alphanumeric': 0.18596828447861605, 'fraction_numerical': 0.024987986544930323, 'mean_word_length': 5.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '280403', 'n_tokens_mistral': 897, 'n_tokens_neox': 849, 'n_words': 194}