diff --git a/Dockerfile b/Dockerfile index 5bcacc2..ed52a8d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ ADD root/ / # Fix the original permissions of /tmp, the PHP default upload tmp dir. RUN chmod 777 /tmp && chmod +t /tmp # Setup the required extensions. +RUN /tmp/setup/python-mlbackend.sh RUN /tmp/setup/php-extensions.sh RUN /tmp/setup/oci8-extension.sh diff --git a/root/tmp/setup/python-mlbackend.sh b/root/tmp/setup/python-mlbackend.sh new file mode 100755 index 0000000..783b46a --- /dev/null +++ b/root/tmp/setup/python-mlbackend.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -e + +echo "Installing Moodle Python mlbackend" + +apt-get update +apt-get install -y --no-install-recommends python2.7 python-pip python2.7-dev +pip -V +pip install tensorflow>=1.0.0,<1.1 +pip install moodlemlbackend + +# Keep our image size down. +rm -rf ~/.cache/pip +apt-get autoremove -y +apt-get clean +rm -rf /var/lib/apt/lists/*