diff --git a/FAQ.md b/FAQ.md index a127c9e1dda4306b4f70ee8905f178d8843b6e88..98de4a26ebe22c8cb9c7c916dada77ee3dbd6dfd 100644 --- a/FAQ.md +++ b/FAQ.md @@ -2,7 +2,7 @@ A non-exhaustive list of Frequently Asked Questions for the [Flatland Challenge](https://www.aicrowd.com/challenges/flatland-challenge). -## How do I locally build a docker image out of my submission ? +### How do I locally build a docker image out of my submission ? * Install Dependencies - **docker** : By following the instructions [here](https://docs.docker.com/install/linux/docker-ce/ubuntu/) @@ -21,5 +21,18 @@ sudo aicrowd-repo2docker --no-run \ --debug . ``` +### Debugging the packaged software environment + +If you have issues with your submission because of your software environment and dependencies, you can debug them, by first building the docker image, and then getting a shell inside the image by : + +``` +# After ensuring that you have build the docker image by following the +# instructions here : https://github.com/AIcrowd/flatland-challenge-starter-kit/blob/master/FAQ.md#how-do-i-locally-build-a-docker-image-out-of-my-submission- + +docker run --net=host -it my-random-agent /bin/bash +``` + +and then exploring to find the cause of the issue. + # Author Sharada Mohanty <https://twitter.com/MeMohanty> \ No newline at end of file diff --git a/README.md b/README.md index d4496f256a1378249d24b79cec5158048ad3c793..5a44a5ead7a741d22f84b0b9dadaabf9ab65195b 100644 --- a/README.md +++ b/README.md @@ -43,17 +43,32 @@ cd flatland-challenge-starter-kit ### Test Submission Locally -**NOTE** : Please ensure that you have a redis-server running on localhost. +* First lets begin by downloading a small set of test envs, and put them at a location of your choice. +In this exercise, we assume that you will download the test-envs provided at : [https://www.aicrowd.com/challenges/flatland-challenge/dataset_files](https://www.aicrowd.com/challenges/flatland-challenge/dataset_files), and will untar them inside `./scratch/test-envs`, so that you have a directory structure similar to : + +``` + +``` + +* `redis-server` : **NOTE** : Please ensure that you have a redis-server running on localhost. You can find more instructions on how to run redis [here](https://redis.io/topics/quickstart) + +* **Run evaluator** + ``` cd flatland-challenge-starter-kit # In a separate tab : run local grader flatland-evaluation --tests <path_to_your_tests_directory> +``` + +* **Run Agent(s)** + +``` # In a separate tab : export AICROWD_TESTS_FOLDER=<path_to_your_tests_directory> -# or on windows : +# or on Windows : # # SET AICROWD_TESTS_FOLDER=<path_to_your_tests_directory> python run.py @@ -113,16 +128,6 @@ conda env export --no-build > environment.yml # Note the `--no-build` flag, which is important if you want your anaconda env to be replicable across all ``` -### Debugging the packaged software environment - -If you have issues with your submission because of your software environment and dependencies, you can debug them, by first building the docker image, and then getting a shell inside the image by : - -``` -docker run --net=host -it $IMAGE_NAME /bin/bash -``` - -and then exploring to find the cause of the issue. - ### Code Entrypoint The evaluator will use `/home/aicrowd/run.sh` as the entrypoint, so please remember to have a `run.sh` at the root, which can instantitate any necessary environment variables, and also start executing your actual code. This repository includes a sample `run.sh` file.