aboutsummaryrefslogtreecommitdiff
path: root/src/python/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/install.sh')
-rwxr-xr-xsrc/python/install.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/python/install.sh b/src/python/install.sh
index 3cf3a88..ac5eec6 100755
--- a/src/python/install.sh
+++ b/src/python/install.sh
@@ -34,6 +34,9 @@ keyserver hkp://keyserver.pgp.com"
set -e
+# Clean up
+rm -rf /var/lib/apt/lists/*
+
if [ "$(id -u)" -ne 0 ]; then
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
exit 1
@@ -199,8 +202,10 @@ oryx_install() {
apt_get_update()
{
- echo "Running apt-get update..."
- apt-get update -y
+ if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
+ echo "Running apt-get update..."
+ apt-get update -y
+ fi
}
# Checks if packages are installed and installs them if not
@@ -232,8 +237,7 @@ install_from_source() {
libbz2-dev libreadline-dev libxml2-dev xz-utils libgdbm-dev tk-dev dirmngr \
libxmlsec1-dev libsqlite3-dev libffi-dev liblzma-dev uuid-dev
if ! type git > /dev/null 2>&1; then
- apt_get_update
- apt-get -y install --no-install-recommends git
+ check_packages git
fi
# Find version using soft match
@@ -454,4 +458,7 @@ if [ "${INSTALL_JUPYTERLAB}" = "true" ]; then
fi
fi
+# Clean up
+rm -rf /var/lib/apt/lists/*
+
echo "Done!"