Skip to content

Install python and moodlemlbackend package #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/*