- lynx-runtime
- Architecture
- Setup
- Building container image
- Running container image
- Running tests
- Development
- version 0.1: Runtime responsible for creating game's environment, running user's code and returning the results through other microservices to lynx-frontend.
Small runtime running user's code in randomly generated environment.
User can perform specific callbacks
in order to change state of the game's world.
Changes to the world are printed to stdout
which is captured by runner
microservice and passed further until it reaches frontend service which displays it in a visual environment.
pip install -r requirements.txt
To use autopep8
hook for pre-commit
:
python -m pip install autopep8 pre-commit
pre-commit install
podman build . -t lynx-runtime:<version>
docker build . -t lynx-runtime:<version>
In order to run code.py
found inside ./usr
directory use:
podman run -v./usr/:/code:ro lynx-runtime:<version>
docker run -v <absolute local path to the ./usr directory>:/code:ro lynx-runtime:<version>
In order to run all tests found inside ./tests
directory use:
pytest tests
- Create basic classes for level, agents etc.
- Add game main loop.
- User's code execution inside
exec
using predefined__builtins__
.