forked from adacotech/docker-mlflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·22 lines (21 loc) · 1.11 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
apt update
apt install -y --no-install-recommends wget git curl \
build-essential libffi-dev libssl-dev \
zlib1g-dev liblzma-dev libbz2-dev libreadline-dev \
libsqlite3-dev ca-certificates
apt upgrade -y
git clone https://github.com/pyenv/pyenv.git $PYENV_ROOT
$PYENV_ROOT/plugins/python-build/install.sh
/usr/local/bin/python-build -v $PYTHON_VERSION $PYTHON_ROOT
rm -rf $PYENV_ROOT
curl -sSL https://install.python-poetry.org | python -
poetry config virtualenvs.create false
poetry install
poetry add "mlflow==${mlflow_version}"
apt remove -y build-essential git wget curl
apt purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
rm -rf $HOME/.poetry
rm -rf /var/lib/apt/lists/*
find /usr/local -depth \( \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \) -exec rm -rf '{}' +
find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' | awk '/=>/ { print $(NF-1) }' | sort -u | xargs -r dpkg-query --search | cut -d: -f1 | sort -u | xargs -r apt-mark manual