Environment Setting#

Setup using docker#

You need to take the following steps to set up the visualization tool and run it on your local machine with docker

  1. Make sure that Docker is installed

  2. Build the image

1_docker_build_image.sh
  1. Create a conatiner from the image. Note at the end of the container creation, you will be asked to log into your wandb account.

2_docker_create_container.sh
  1. Run the conatiner. This will run the backend on port 8000, and frontend on port 3000.

3_docker_run_container.sh

Note

For repeated runs

You only need to execute step 2 once, to have an image with the required dependencies. Step 3 can be repeated to create a container with updated frontend/ and backend/ code. The script will delete and overwrite an existing container, and uses the code from this repository. The last step needs to be executed every time you want to run the visualization.

Setup (Standard)#

You can also set up the tool without using Docker

  • Make sure that all requirements listed in the /pip_requirements.txt are satisfied.

  • For backend:

    1. Change the working directory to /history_visualization/backend

    2. Install the dependencies for backend

    pip install fastapi
    pip install "uvicorn[standard]"
    pip install argparse
    
    1. Run the backend sever at localhost:8000.

    python main.py
    
  • For frontend:

    1. Start a new terminal

    2. Install Node.js

    3. Download dependencies:

    npm install -d
    
    1. Run the backend sever at localhost:3000

    npm start
    

Verify correctness:#

To verify that everything is running correctly after executing the launching process mentioned above:

  1. check localhost:8000 in your browser, you should see this:

../_images/frontend_start.png
  1. check localhost:3000 in your browser, you should see this:

../_images/backend_start.png