Skip to content

Commit f604e0e

Browse files
committed
use miniconda instead
1 parent d518f6f commit f604e0e

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

entrypoint.sh

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,27 @@ set -e
44

55
sleep 3
66

7-
case $(arch) in
8-
x86_64) _ARCH="linux-64" ;;
9-
aarch64) _ARCH="linux-aarch64" ;;
10-
ppc64le) _ARCH="linux-ppc64le" ;;
11-
*) echo "Unsupported architecture"; exit 1 ;;
12-
esac
13-
14-
MICRO_MAMBA="https://micro.mamba.pm/api/micromamba/${_ARCH}/latest"
15-
16-
echo $MICRO_MAMBA
17-
curl -fsSL $MICRO_MAMBA | tar -xvj bin/micromamba
18-
mv bin/micromamba /usr/bin/mamba
19-
/usr/bin/mamba shell init -s bash -p /opt/dev/mamba
7+
_ARCH=$(arch)
8+
DEV_PATH="/opt/dev"
9+
MINI_CONDA="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-${_ARCH}.sh"
10+
11+
curl -fsSL "$MINI_CONDA" -o /tmp/conda.sh
12+
chmod +x /tmp/conda.sh && sh /tmp/conda.sh -b -p "$DEV_PATH/conda"
13+
14+
cat <<EOF | tee -a "$HOME"/.bashrc
15+
# >>> conda initialize >>>
16+
if test -f "$DEV_PATH/conda/etc/fish/conf.d/conda.fish"
17+
. "$DEV_PATH/conda/etc/fish/conf.d/conda.fish"
18+
else
19+
set -x PATH "$DEV_PATH/conda/bin" $PATH
20+
end
21+
# <<< conda initialize <<<
22+
EOF
23+
24+
25+
# /usr/bin/mamba shell init -s bash -p /opt/dev/mamba
2026
# . "$HOME/.bashrc"
2127

22-
# micromamba create -n aii python=3.11 gradio -c conda-forge
28+
# micromamba -y create -n aii python=3.11 gradio -c conda-forge
2329
# micromamba activate aii
2430
exec "$@"

0 commit comments

Comments
 (0)