Skip to content

Commit cd5028d

Browse files
committed
rollback to mamba
1 parent 0512970 commit cd5028d

File tree

2 files changed

+15
-20
lines changed

2 files changed

+15
-20
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
```bash
1515
doas podman run --name aii -it monius/docker-ai-infra /bin/bash
1616

17-
doas podman rm -f $(doas podman ps -a -q)
17+
doas podman rm -f $(doas podman ps -a -q)
1818
doas podman rmi -f $(doas podman images -a -q)
1919
```

entrypoint.sh

+14-19
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,22 @@ set -e
44

55
sleep 3
66

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-
16-
if [ -f "$DEV_PATH/conda/etc/profile.d/conda.sh" ]; then
17-
. "$DEV_PATH/conda/etc/profile.d/conda.sh"
18-
else
19-
export PATH="$DEV_PATH/conda/bin:$PATH"
20-
fi
21-
22-
EOF
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
2313

14+
DEV_PATH="/opt/dev"
15+
MICRO_MAMBA="https://micro.mamba.pm/api/micromamba/${_ARCH}/latest"
2416

25-
# /usr/bin/mamba shell init -s bash -p /opt/dev/mamba
17+
echo $MICRO_MAMBA
18+
curl -fsSL $MICRO_MAMBA | tar -xvj bin/micromamba
19+
mv bin/micromamba /usr/bin/mamba
20+
/usr/bin/mamba shell init -s bash -p $DEV_PATH/mamba
2621
# . "$HOME/.bashrc"
2722

28-
# micromamba -y create -n aii python=3.11 gradio -c conda-forge
29-
# micromamba activate aii
23+
micromamba create -n aii python=3.11 gradio -c conda-forge -y
24+
micromamba activate aii
3025
exec "$@"

0 commit comments

Comments
 (0)