Skip to content

Commit

Permalink
Install python and moodlemlbackend package
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonllao authored and David Monllaó committed Jan 30, 2019
1 parent 0a4c59d commit 0f2c1d7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
17 changes: 17 additions & 0 deletions root/tmp/setup/python-mlbackend.sh
Original file line number Diff line number Diff line change
@@ -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/*

0 comments on commit 0f2c1d7

Please sign in to comment.