How to specify runtime environment for your submission

#1

Every code has its own package and dependency requirements. To simplify the process for our participants, we use forked version of repo2docker. As the name suggests repo2docker fetches a git repository and builds a container image based on the configuration files found in the repository.

The configuration files need to be present in your repository root. The following configuration files can be used:

You can click on the links above to view example usage for each of the configuration files. We highly recommend using conda environments so you can replicate ~same runtime in your local machines easily. You can read this FAQ to learn how to use Conda for your submission.

Locally build docker image with above configuration files (optional)

Incorrect configuration files can cause your submission to fail BUT you will have access to build logs and can fix your configurations using it. You can test out your configuration files locally for faster debug cycle instead of making submission on AIcrowd.

  1. Install aicrowd-repo2docker package from pypi
pip install aicrowd-repo2docker
  1. Change the current directory to your repository root and create docker image. If this command runs successfully, it means that your image is good to go for submission.
aicrowd-repo2docker \
        --no-run \
        --user-id 1001 \
        --user-name aicrowd \
        --image-name sample_aicrowd_image_build \
        --debug \
        .
  1. (Optional) Verify the runtime environment locally. This is possible that you end up getting environment which isn’t desire due to mistake in writing above configuration files and/or due to package overwritten by different configuration file. The best way to check the same is by running docker image we built above.
docker run -it sample_aicrowd_image_build /bin/bash
#> Inside the newly opened bash session
#> pip freeze
#> [any command you would like to verify environment]
1 Like