Skip to content

Commit

Permalink
Merge pull request #128 from isuruf/miniforge
Browse files Browse the repository at this point in the history
Use Miniforge
  • Loading branch information
scopatz authored Mar 18, 2020
2 parents a79b84d + 000471f commit e7eacf6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
8 changes: 1 addition & 7 deletions scripts/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ export USER=conda
export LOGNAME=conda
export MAIL=/var/spool/mail/conda
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/conda/bin
if [ "$(uname -m)" = "x86_64" ]; then
export supkg="gosu"
elif [ "$(uname -m)" = "aarch64" ]; then
export supkg="su-exec"
else
export supkg="su-exec"
fi
export supkg="su-exec"
chown conda:conda $HOME
cp -R /etc/skel $HOME && chown -R conda:conda $HOME/skel && (ls -A1 $HOME/skel | xargs -I {} mv -n $HOME/skel/{} $HOME) && rm -Rf $HOME/skel
cp /root/.condarc $HOME/.condarc && chown conda:conda $HOME/.condarc
Expand Down
20 changes: 10 additions & 10 deletions scripts/run_commands
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

set -exo pipefail

export additional_channel=""
export additional_channel="--add channels defaults"

if [ "$(uname -m)" = "x86_64" ]; then
export supkg="gosu"
export condapkg="https://repo.continuum.io/miniconda/Miniconda3-4.6.14-Linux-x86_64.sh"
export conda_chksum="718259965f234088d785cad1fbd7de03"
export supkg="su-exec"
export condapkg="https://github.com/conda-forge/miniforge/releases/download/4.8.3-0/Miniforge3-4.8.3-0-Linux-x86_64.sh"
export conda_chksum="1db6013e836da2ea817a53c44b0fd9beea521013bcb94b2b5440b1a61ba8b338"
elif [ "$(uname -m)" = "ppc64le" ]; then
export supkg="su-exec"
export condapkg="https://repo.continuum.io/miniconda/Miniconda3-4.7.12.1-Linux-ppc64le.sh"
export conda_chksum="9de38932ed6a8865562e6057b578694f"
export condapkg="https://github.com/conda-forge/miniforge/releases/download/4.8.3-0/Miniforge3-4.8.3-0-Linux-ppc64le.sh"
export conda_chksum="d9f11778ab03710fe9f82964b56f67de6ce29b551459dc6903b114cd5df1e4a0"
elif [ "$(uname -m)" = "aarch64" ]; then
export supkg="su-exec"
export condapkg="https://github.com/conda-forge/miniforge/releases/download/4.8.2-1/Miniforge3-4.8.2-1-Linux-aarch64.sh"
export conda_chksum="5cb1651b53052a76d8c2273309578889"
export condapkg="https://github.com/conda-forge/miniforge/releases/download/4.8.3-0/Miniforge3-4.8.3-0-Linux-aarch64.sh"
export conda_chksum="359fa54c375d1af3dd21d76aa8a64f800347d3b3a6e53d3b37dcdd88b4a2e7b6"
elif [ "$(uname -m)" = "armv7l" ]; then
export supkg="su-exec"
export condapkg="https://github.com/jjhelmus/conda4armv7l/releases/download/1.0.0/conda4armv7l_installer-1.0.0-Linux-armv7l.sh"
export conda_chksum="7d1b7b10d5194d8572cc39dd22fe6e18"
export conda_chksum="91471e99c090867f242f377b10470a4e8debd6e8af1007da3e692782b8e8b83f"
# defaults is not enough
export additional_channel="--add channels c4armv7l"
else
Expand All @@ -32,7 +32,7 @@ echo 'conda ALL=NOPASSWD: /usr/bin/yum' >> /etc/sudoers

# Install the latest Miniconda with Python 3 and update everything.
curl -s -L $condapkg > miniconda.sh
md5sum miniconda.sh | grep $conda_chksum
sha256sum miniconda.sh | grep $conda_chksum

bash miniconda.sh -b -p /opt/conda
rm -f miniconda.sh
Expand Down

0 comments on commit e7eacf6

Please sign in to comment.