summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md9
-rw-r--r--tasks.py14
-rw-r--r--yaksh/scripts/yaksh_script.sh1
3 files changed, 15 insertions, 9 deletions
diff --git a/README.md b/README.md
index bc47792..a0faab2 100644
--- a/README.md
+++ b/README.md
@@ -61,13 +61,17 @@ Quick Start
$ invoke serve
+ - *Note:* The serve command will run the django application server on the 8000 port
+ and hence this port will be unavailable to other processes.
+
1. On another terminal start up the code server that executes the user code safely:
- To run the code server in a sandboxed docker environment, run the command:
$ invoke start
- - Make sure that you have docker installed on your system beforehand
+ - Make sure that you have Docker installed on your system beforehand.
+ [Docker Installation](https://docs.docker.com/engine/installation/#desktop)
- To run the code server without docker, locally use:
@@ -75,7 +79,8 @@ Quick Start
$ invoke start --unsafe
- Note this command will run the yaksh code server locally on your machine
- and is susceptible to malicious code.
+ and is susceptible to malicious code. You will have to install the code
+ server requirements in sudo mode.
diff --git a/tasks.py b/tasks.py
index 4e41ed5..ff5b1cb 100644
--- a/tasks.py
+++ b/tasks.py
@@ -47,26 +47,26 @@ def start(ctx, ports=SERVER_POOL_PORT, image=SRC_IMAGE_NAME, unsafe=False):
cmd_params = {'ports': ports,
'image': SRC_IMAGE_NAME,
'name': TARGET_CONTAINER_NAME,
- 'vol_mount': os.path.join(SCRIPT_DIR, 'yaksh_data/'),
+ 'vol_mount': os.path.join(SCRIPT_DIR, 'yaksh_data'),
'command': 'sh {0}'.format(
os.path.join(SCRIPT_DIR,
- 'yaksh_data/yaksh/scripts/yaksh_script.sh')
+ 'yaksh_data', 'yaksh', 'scripts', 'yaksh_script.sh')
)
}
getimage(ctx, image=SRC_IMAGE_NAME)
print("** Preparing code server **")
- create_dir(os.path.join(SCRIPT_DIR, 'yaksh_data/data'))
- create_dir(os.path.join(SCRIPT_DIR, 'yaksh_data/output'))
+ create_dir(os.path.join(SCRIPT_DIR, 'yaksh_data', 'data'))
+ create_dir(os.path.join(SCRIPT_DIR, 'yaksh_data', 'output'))
ctx.run('cp -r {0} {1}'.format(
- os.path.join(SCRIPT_DIR, 'yaksh/'),
- os.path.join(SCRIPT_DIR, 'yaksh_data/')
+ os.path.join(SCRIPT_DIR, 'yaksh'),
+ os.path.join(SCRIPT_DIR, 'yaksh_data')
)
)
ctx.run('cp {0} {1}'.format(
- os.path.join(SCRIPT_DIR, 'requirements/requirements-codeserver.txt'),
+ os.path.join(SCRIPT_DIR, 'requirements', 'requirements-codeserver.txt'),
os.path.join(SCRIPT_DIR, 'yaksh_data')
)
)
diff --git a/yaksh/scripts/yaksh_script.sh b/yaksh/scripts/yaksh_script.sh
index f19ad3d..f39153e 100644
--- a/yaksh/scripts/yaksh_script.sh
+++ b/yaksh/scripts/yaksh_script.sh
@@ -2,6 +2,7 @@
# Basic script to install pip packages and run the yaksh code server command
chown -R nobody output
+chmod -R a+rwX output
chmod -R a+rX data yaksh
chmod -R o-w data yaksh
echo "** Installing python dependencies **"