Skip to content

Commit 0f2c1d7

Browse files
dmonllaoDavid Monllaó
authored and
David Monllaó
committed
Install python and moodlemlbackend package
1 parent 0a4c59d commit 0f2c1d7

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ ADD root/ /
44
# Fix the original permissions of /tmp, the PHP default upload tmp dir.
55
RUN chmod 777 /tmp && chmod +t /tmp
66
# Setup the required extensions.
7+
RUN /tmp/setup/python-mlbackend.sh
78
RUN /tmp/setup/php-extensions.sh
89
RUN /tmp/setup/oci8-extension.sh
910

root/tmp/setup/python-mlbackend.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
echo "Installing Moodle Python mlbackend"
6+
7+
apt-get update
8+
apt-get install -y --no-install-recommends python2.7 python-pip python2.7-dev
9+
pip -V
10+
pip install tensorflow>=1.0.0,<1.1
11+
pip install moodlemlbackend
12+
13+
# Keep our image size down.
14+
rm -rf ~/.cache/pip
15+
apt-get autoremove -y
16+
apt-get clean
17+
rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)