diff options
| author | 2021-01-10 21:19:44 -0800 | |
|---|---|---|
| committer | 2021-01-10 21:35:26 -0800 | |
| commit | dab2a0ac4f9e5080865e77048c936ab279e5918d (patch) | |
| tree | f56df32946f11ed0cde87d924e1653d233257efa /README.md | |
| parent | Support overriding nsjail config values with additional arguments (diff) | |
Replace nsjpy alias with a Python script
The Python script uses the same underlying code Falcon uses to invoke
nsjail. It allows for the omission of redundant shell code that set up
cgroups and nsjail args.
This is also a step towards removing dependence on shell scripts and
thus resolving #73.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -153,13 +153,13 @@ pipenv run devsh [--build [--clean]] [bash_args ...] #### Invoking NsJail -A shell alias named `nsjpy` is included and is basically `nsjail python -c <args>` but NsJail is configured as it would be if snekbox invoked it (such as the time and memory limits). It provides an easy way to run Python code inside NsJail without the need to run snekbox with its webserver and send HTTP requests. Example usage: +NsJail can be invoked in a more direction manner that does not require using a web server or its API. See `python -m snekbox --help`. Example usage: ```bash -nsjpy "print('hello world!')" +python -m snekbox 'print("hello world!")' --time_limit 0 ``` -The alias can be found in `./scripts/.profile`, which is automatically added when the shell is launched in the container. +With this command, NsJail uses the same configuration normally used through the web API. It also has an alias, `pipenv run eval`. [1]: https://github.com/python-discord/snekbox/workflows/Lint,%20Test,%20Build,%20Push/badge.svg?branch=master [2]: https://github.com/python-discord/snekbox/actions?query=workflow%3A%22Lint%2C+Test%2C+Build%2C+Push%22+branch%3Amaster |