Sign inSign up

moodlehq/moodle-mlbackend-python

By moodlehq

•Updated over 4 years ago

This image install the python machine learning backend for Moodle.

Image
2

10K+

moodlehq/moodle-mlbackend-python repository overview

⁠What is this image for?

This image install the python machine learning backend for Moodle.

The list of users with access to the service should be specified as a comma-separated list of user:password in the MOODLE_MLBACKEND_PYTHON_USERS environment var. This is the default value:

`MOODLE_MLBACKEND_PYTHON_USERS=default:sshhhh`

This image can use the container's file system or an S3 bucket to store the trained machine learning algorithms.

  • If you use the container's file system, the files will be stored in the directory specified in the MOODLE_MLBACKEND_PYTHON_DIR environment var. This is the default value:

    MOODLE_MLBACKEND_PYTHON_DIR=/opt/mlbackenddata

  • To use an S3 bucket instead, set the following environment variable on docker run. You will also need to set your AWS credentials (e.g. AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY...) as environment variables.

    -e MOODLE_MLBACKEND_PYTHON_S3_BUCKET_NAME=i-am-a-bucket-name -e AWS_ACCESS_KEY_ID=TheKey -e AWS_SECRET_ACCESS_KEY=TheSecretKey

⁠Versions

This image is compatible with Moodle 3.8.0 onwards.

⁠How to use this image

Start the server storing the trained machine learning algorithm in the container's file system:

`docker run -d -p 5000:5000 --name=mlbackendpython --rm --add-host=mlbackendpython:0.0.0.0 moodlehq/moodle-mlbackend-python`

Start the server storing the trained machine learning algorithm in S3:

`docker run -d -p 5000:5000 --name=mlbackendpython -e MOODLE_MLBACKEND_PYTHON_S3_BUCKET_NAME=i-am-a-bucket-name -e AWS_ACCESS_KEY_ID=TheKey -e AWS_SECRET_ACCESS_KEY=TheSecretKey -e AWS_DEFAULT_REGION=a-region --rm --add-host=mlbackendpython:0.0.0.0 moodlehq/moodle-mlbackend-python`

To start the server for development just bind mount the host directory with moodle-mlbackend-python's code:

`docker run -d -p 5000:5000 --name=mlbackendpython -v /local/directory/where/moodle-mlbackend-python/is/installed:/app --rm --add-host=mlbackendpython:0.0.0.0 moodlehq/moodle-mlbackend-python`

To link the container to moodle-docker network:

`docker run -d -p 5000:5000 --name=mlbackendpython -v /local/directory/where/moodle-mlbackend-python/is/installed:/app --rm --add-host=mlbackendpython:0.0.0.0 --network=moodledocker_default moodlehq/moodle-mlbackend-python`

Tag summary

Content type

Image

Digest

Size

683.4 MB

Last updated

over 4 years ago

docker pull moodlehq/moodle-mlbackend-python:2.6.6-python3.7.5