Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
1b0f98ed
Commit
1b0f98ed
authored
Sep 09, 2014
by
Feanil Patel
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1159 from edx/feanil/sandbox_matplotlib
Make changes need for matplotlib to work in the code sandbox.
parents
f61767ce
6a6871c3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
5 deletions
+39
-5
playbooks/roles/edxapp/defaults/main.yml
+3
-3
playbooks/roles/edxapp/tasks/main.yml
+1
-1
playbooks/roles/edxapp/tasks/python_sandbox_env.yml
+10
-0
playbooks/roles/edxapp/tasks/xml.yml
+8
-0
playbooks/roles/edxapp/templates/code.sandbox.j2
+17
-1
No files found.
playbooks/roles/edxapp/defaults/main.yml
View file @
1b0f98ed
...
...
@@ -290,10 +290,10 @@ EDXAPP_FILE_UPLOAD_STORAGE_PREFIX: 'submissions_attachments'
EDXAPP_CODE_JAIL_LIMITS
:
# Limit the memory of the jailed process to something high but not
# infinite (
128
MiB in bytes)
VMEM
:
134217728
# infinite (
512
MiB in bytes)
VMEM
:
536870912
# Time in seconds that the jailed process has to run.
REALTIME
:
1
REALTIME
:
3
# Needs to be non-zero so that jailed code can use it as their temp directory.(1MiB in bytes)
FSIZE
:
1048576
...
...
playbooks/roles/edxapp/tasks/main.yml
View file @
1b0f98ed
...
...
@@ -81,7 +81,7 @@
with_items
:
service_variants_enabled
# Set up the python sandbox execution environment
-
include
:
python_sandbox_env.yml
-
include
:
python_sandbox_env.yml
tags=deploy
when
:
EDXAPP_PYTHON_SANDBOX
-
include
:
deploy.yml tags=deploy
playbooks/roles/edxapp/tasks/python_sandbox_env.yml
View file @
1b0f98ed
# Set the alternatives this way for blas and lapack to work correctly for the
# MITx 6.341x course.
# TODO: Switch to using alternatives module in 1.6
-
name
:
code sandbox | Use libblas for 3gf
command
:
update-alternatives --set libblas.so.3gf /usr/lib/libblas/libblas.so.3gf
# TODO: Switch to using alternatives module in 1.6
-
name
:
code sandbox | Use liblapac for 3gf
command
:
update-alternatives --set liblapack.so.3gf /usr/lib/lapack/liblapack.so.3gf
-
name
:
code sandbox | Create edxapp sandbox user
user
:
name={{ edxapp_sandbox_user }} shell=/bin/false home={{ edxapp_sandbox_venv_dir }}
notify
:
...
...
playbooks/roles/edxapp/tasks/xml.yml
View file @
1b0f98ed
-
name
:
make the course data updatable by the edxapp user
file
:
path="{{ edxapp_course_data_dir }}"
state=directory
recurse=yes
owner="{{ edxapp_user }}"
group="{{ edxapp_user }}"
-
name
:
clone the xml course repo
git
:
>
repo="{{ item.repo_url }}"
...
...
playbooks/roles/edxapp/templates/code.sandbox.j2
View file @
1b0f98ed
...
...
@@ -9,7 +9,7 @@
/tmp/codejail-*/** wrix,
#
# Whitelist partic
ic
lar shared objects from the system
# Whitelist partic
u
lar shared objects from the system
# python installation
#
/usr/lib/python2.7/lib-dynload/_json.so mr,
...
...
@@ -21,6 +21,22 @@
/usr/lib/python2.7/lib-dynload/_elementtree.so mr,
/usr/lib/python2.7/lib-dynload/pyexpat.so mr,
# Matplot lib needs a place for temp caches
{{ edxapp_sandbox_venv_dir }}/.config/ wrix,
{{ edxapp_sandbox_venv_dir }}/.cache/ wrix,
{{ edxapp_sandbox_venv_dir }}/.config/** wrix,
{{ edxapp_sandbox_venv_dir }}/.cache/** wrix,
# Matplotlib related libraries
/usr/lib/python2.7/lib-dynload/termios.so mr,
/usr/lib/python2.7/lib-dynload/parser.so mr,
# Matplot lib needs fonts to make graphs
/usr/share/fonts/ r,
/usr/share/fonts/** r,
/usr/local/share/fonts/ r,
/usr/local/share/fonts/** r,
#
# Allow access to selections from /proc
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment