Dev Environment Setup

Dev Environment Setup#

Pre-reqs and system setup are covered in server setup. You will then need to fork and clone the repo.

Local Testing#

The following instructions are for once you’ve made changes to your local forked repo and you’re ready to test.

  1. cd to root folder of scout

  2. Build the docker image of your altered code. You’ll want to tag the image for easy reference later. For this demo, we use the tag yourimage.

    docker build -t yourimage .
    
  3. Verify you have a successful build. Check your terminal logs for the following:

    Successfully built [IMAGE-ID]
    Successfully tagged yourimage:latest
    
  4. Run a container with your newly built docker image.

    docker run --privileged -p 1337:1337 --rm -it --gpus all --mount type=bind,source=/data,target=/data -e ENV_IP="`ip route get 1 | sed 's/^.*src \([^ ]*\).*$/\1/;q'`" -v /data/scout/db:/data/db -v /data/scout/tmp:/tmp/scout-tmp yourimage:latest
    
  5. Provide the image directory information you created in server setup. This will only be necessary for your first setup.

  6. Check your work! Use your browser to access localhost:1337 and see if your changes are working as desired.

  7. Continue making changes or create your PR.

Alternative run commands#

If you are doing development work on a feature that is not impacted by image availability or ML results, you can run without GPU support.

docker run --privileged -p 1337:1337 --rm -it --mount type=bind,source=/data,target=/data -e ENV_IP="`ip route get 1 | sed 's/^.*src \([^ ]*\).*$/\1/;q'`" -v /data/scout_data:/data/db -v /data/scout/tmp:/tmp/scout-tmp yourimage:latest