docker-library / julia

Docker Official Image packaging for julia

Home Page:http://julialang.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`bzip2` not installed in `julia:0.7` docker image

NHDaly opened this issue · comments

I am setting up CI on CircleCI for my julia project, which uses PyPlot, and so needs PyCall.

I have the build based off of this docker image, julia:0.7, but it seems to be missing bzip2. This is the build error I get when building PyCall:

  Building PyCall → `~/.julia/packages/PyCall/akNFy/deps/build.log`
┌ Error: Error building `PyCall`: 
│   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
│                                  Dload  Upload   Total   Spent    Left  Speed
100 55.7M  100 55.7M    0     0   123M      0 --:--:-- --:--:-- --:--:--  123M
│ WARNING: bzip2 does not appear to be installed this may cause problems below
│ PREFIX=/root/.julia/packages/Conda/m7vem/deps/usr
│ /root/.julia/packages/Conda/m7vem/deps/usr/installer.sh: 343: /root/.julia/packages/Conda/m7vem/deps/usr/installer.sh: bunzip2: not found
│ tar: This does not look like a tar archive
│ tar: Exiting with failure status due to previous errors
│ ┌ Info: Using the Python distribution in the Conda package by default.
│ └ To use a different Python version, set ENV["PYTHON"]="pythoncommand" and re-run Pkg.build("PyCall").
│ [ Info: Downloading miniconda installer ...
│ [ Info: Installing miniconda ...
│ ERROR: LoadError: failed process: Process(`/root/.julia/packages/Conda/m7vem/deps/usr/installer.sh -b -f -p /root/.julia/packages/Conda/m7vem/deps/usr`, ProcessExited(1)) [1]
│ Stacktrace:
│  [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42
│  [2] pipeline_error at ./process.jl:712 [inlined]
│  [3] #run#509(::Bool, ::Function, ::Cmd) at ./process.jl:670
│  [4] run at ./process.jl:668 [inlined]
│  [5] macro expansion at ./logging.jl:317 [inlined]
│  [6] _install_conda(::String, ::Bool) at /root/.julia/packages/Conda/m7vem/src/Conda.jl:146
│  [7] _install_conda(::String) at /root/.julia/packages/Conda/m7vem/src/Conda.jl:145
│  [8] runconda(::Cmd, ::String) at /root/.julia/packages/Conda/m7vem/src/Conda.jl:111
│  [9] add at /root/.julia/packages/Conda/m7vem/src/Conda.jl:174 [inlined] (repeats 2 times)
│  [10] top-level scope at logging.jl:312
│  [11] top-level scope at /root/.julia/packages/PyCall/akNFy/deps/build.jl:196
│  [12] include at ./boot.jl:317 [inlined]
│  [13] include_relative(::Module, ::String) at ./loading.jl:1038
│  [14] include(::Module, ::String) at ./sysimg.jl:29
│  [15] include(::String) at ./client.jl:398
│  [16] top-level scope at none:0
│ in expression starting at /root/.julia/packages/PyCall/akNFy/deps/build.jl:170
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Operations.jl:1068

I fixed this by adding apt-get update and apt-get install bzip2 as build-steps before any of my julia steps. But should this be pre-installed as part of the docker image?

Thanks!
~Nathan

Since it's a specific package install that's requiring this, I'm inclined to say this is similar to a package that needs header files, or invokes a particular tool.

To be specific, I think it's the responsibility of the user of this image to pull in any necessary dependencies for things they wish to install in this image (since it's fully functional without bunzip2, and many Julia packages can even be installed successfully without it).

Yeah that's totally reasonable. I just wasn't sure if bzip2 is one of those things that's expected to be installed or not. I'm happy either way! :)

That said, I am a little surprised that conda.jl doesn't automatically install it.. should I file an issue over that?

They probably didn't want to have to deal with APT vs Yum vs DNF vs apk vs emerge vs pacman vs ... in order to install that for you. 😄