Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing miniconda on alpine linux fails

I have been attempting to install miniconda on an Alpine linux docker image. The minimal "working" example of my failure can be reproduced with Docker as follows:

docker run --rm -it alpine sh
/ # apk update && apk add ca-certificates wget && update-ca-certificates
/ # wget https://repo.continuum.io/miniconda/Miniconda3-4.3.27-Linux-x86_64.sh -O ~/miniconda.sh
/ # sh miniconda.sh -b 
PREFIX=/root/miniconda3
installing: python-3.6.2-h02fb82a_12 ...
/root/miniconda.sh: line 361: /root/miniconda3/pkgs/python-3.6.2-h02fb82a_12/bin/python: not found

The file that it looks for is there, though:

/ # ls /root/miniconda3/pkgs/python-3.6.2-h02fb82a_12/bin/python
/root/miniconda3/pkgs/python-3.6.2-h02fb82a_12/bin/python

I would appreciate some insight on this error. I have little idea of what to try next

like image 563
Jytug Avatar asked Nov 08 '17 10:11

Jytug


People also ask

Where should I install Miniconda on Linux?

I go with the default installation path, which is /var/home/sk/miniconda3 in my case. If you've chosen the default location, the installer will display “PREFIX=/var/home/<user>/miniconda3” and continue the installation. It may take a few minutes to complete. Finally, you will be prompted to initialize Miniconda.

Is Alpine Linux good for Docker?

Alpine Linux is a super lightweight Linux distribution that's useful for Docker containers.

Do I need Python to install Miniconda?

Miniconda comes with Python and a small number of essential packages. Additional packages can be installed using the package management systems mamba or conda. Both offer similar functionality, but we suggest using mamba because it is significantly faster for installing the libraries needed for using Python for GIS.


1 Answers

According to @VladFrolov, anaconda's python is linked to glibc, which isn't available in alpine. For more details about how he built an alpine image with conda, look at https://github.com/frol/docker-alpine-miniconda3

PS: Looks like @VladFrolov now maintains miniconda3:alpine official image https://github.com/ContinuumIO/docker-images/blob/master/miniconda3/alpine/Dockerfile ( Thx for pointing out @rpanai )

like image 53
Gabriel Miretti aka gmiretti Avatar answered Sep 29 '22 08:09

Gabriel Miretti aka gmiretti