The overall task of PANDA Studio is to design a service around PANDA which enables the creation of recordings from an image specification and a set of interactions. The following instructions help set up the environment for PANDA Studio to get users started. For information on deployment, development, testing, and a user guide see the docs folder.
PANDA Studio was designed to run on Ubuntu 20.04 and support for other operating systems is not officially supported. It is recommended to either use a native ubuntu install, WSL and Windows, or an Ubuntu virtual machine.
PANDA Studio makes use of Docker to complete several parts of its functionality. Follow the instructions on installing Docker. For more information on Docker refer to the corresponding section in the research memo.
- First clone this repository
git clone https://github.com/panda-re/panda_studio
- Then change into the corresponding directory
cd panda_studio
If you wish to deploy PANDA Studio, refer to the deployment guide. If you wish to test and develop PANDA Studio, continue here.
The backend of PANDA Studio executes interactions specified in the frontend to create a recording for the user. It communicates with the frontend using gRPC and ProtoBuf. For more information about the specifics, see the research document.
- Create directories and download files with a single command
sudo make full_initial_setup
OR
- Install privileged files into root directory
sudo make initial_setup_priviliged
- Setup non-privileged aspects, including setting up the Docker Container
make initial_setup
- Run it!
This will run an executor for the backend that will make a recording and replay that recording. The frontend uses this interface to create recordings from a web-user interface.
docker run -it --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /root/.panda:/root/.panda \
-v /tmp/panda-studio:/tmp/panda-studio \
pandare/panda_executor
The executor is a good playground for trying new features or understanding the general flow of how the frontend interacts with the backend.
Changes to the executor require rebuilding the docker container, which can be done with the command
make docker_executor
Similarly, changes to the agent require rebuilding
make docker_agent
Lastly, any changes to ProtoBuf require running a script to update those changes
cd panda_agent/ && ./generate_protobuf.sh
- Open the Dev Container (optional)
- This contains a mostly complete toolchain with all the tools needed for local development
- In VSCode, a toast will appear in the bottom right corner asking you to open the dev container
The backend comes equipped with tests to ensure its functionality and they can be run using the command:
docker run -it --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /root/.panda:/root/.panda \
-v /tmp/panda-studio:/tmp/panda-studio \
pandare/panda_executor_test
Whenever a new feature is implemented, tests should be added to demonstrate how the feature is used and the expected inputs and outputs. Also, previous tests should still pass so that established features still function. More information can be found in the test plan and documentation.
-
Follow the above instructions to build the required containers
-
Start the API server with the required services
docker compose -f ./docker-compose.dev.yml up --build panda_api
Note: you can use ctrl-C to quit the API. Changes made to the API will automatically be rebuilt
-
Minio's GUI is available on
localhost:9001
. The sign-in information can be found indocker/docker-compose.dev.yml
as access key and secret key -
Mongo Express is a GUI for MongoDB and can be found at
localhost:8081