Skip to content

Latest commit

 

History

History
42 lines (24 loc) · 1.94 KB

File metadata and controls

42 lines (24 loc) · 1.94 KB

Runtime-Agent

Runtime-Agent runs in a Runtime-Container to initialize its machine and to link a user in web IDE with a terminal of the container. It also prepares for code execution by downloading project code from IDE server.

architecture

What it does

  • When Runtime-Container is launched and this server is up, it is assigned a unique API key from Runtime-Bridge and creates random password used for SSH connection.
  • It creates local SSH connection, and forwards messages from the user in web IDE to SSH and vice versa.
  • It prepares for code execution by downloading project code from IDE server into its local directory.

Requirements

  • Python 3.6 to 3.9

    version 3.10 or newer is not allowed because this runs in runtime-containers. Especially, GCC container has python 3.9.

Development

  • Install packages
    $ pip install -r requirements.txt
  • Start server
    $ DEBUG=true uvicorn agent:app --reload

Deployment

There is no need to deploy directly. Runtime-Agent runs inside of Runtime-Container. All you have to do is specify the version of the commit hash you want to use in Dockerfiles of runtime-container.

API Document

API documents can be found here: http://localhost:8000/docs.

They are generated by swagger integrated into FastAPI. It automatically updates documents whenever you modify your code. See more details from here.

api document