package-leaderboard-agent
What it does
The skill builds the Docker image that the CARLA Leaderboard evaluates. It is for developers preparing an autonomous driving agent for submission.
When to use it
- ✓When you want to build the Docker image for a Leaderboard submission.
- ✓When you need to check that your agent's folders and environment are set up correctly before submitting.
- ✓When you want to confirm the image loads your agent before you submit.
Skill link
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/leaderboard/package-leaderboard-agent/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Build the Leaderboard Docker image for my agent and check that it loads before I submit.”
5 new skills a week. 1 minute to read.
How it works
The agent checks the four required folders and the egg file layout the build expects, runs the build script, and then tests inside the image that the stack imports and the agent loads.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Package an agent for submission
Paths.
scripts/…andreferences/…below are relative to the directory holding this SKILL.md. Your working directory is the user's project, not that directory, so prefix them with its absolute path or the command is not found.
The leaderboard evaluates a docker image, not a repository. make_docker.sh
assembles one from four trees plus your code:
$CARLA_ROOT/PythonAPI -> /workspace/CARLA/PythonAPI
$SCENARIO_RUNNER_ROOT -> /workspace/scenario_runner
$LEADERBOARD_ROOT -> /workspace/leaderboard
$TEAM_CODE_ROOT -> /workspace/team_code
and bakes PYTHONPATH, TEAM_AGENT, CHALLENGE_TRACK_CODENAME and the routes into
the image.
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh) — the four roots and the egg layout
- [ ] Step 2: Confirm the agent runs locally first (run-leaderboard-evaluation)
- [ ] Step 3: Build the image
- [ ] Step 4: Verify the image imports the stack and loads the agent
- [ ] Step 5: Submit
Step 1: The egg trap
make_docker.sh does this unconditionally:
cp -fr ${CARLA_ROOT}/PythonAPI .lbtmp
mv .lbtmp/PythonAPI/carla/dist/carla*-py2*.egg .lbtmp/PythonAPI/carla/dist/carla-leaderboard-py2.7.egg
mv .lbtmp/PythonAPI/carla/dist/carla*-py3*.egg .lbtmp/PythonAPI/carla/dist/carla-leaderboard-py3x.egg
so it fails if $CARLA_ROOT/PythonAPI/carla/dist/ has no .egg files — which is
the case for a pip/wheel-only install. check_env.sh reports this before the build
wastes time. Get a CARLA tree that ships eggs (a release tarball or a source build),
or add the wheel to the image yourself.
The py2.7 rename is legacy; a modern release ships only a py3 egg, so the py2 mv
fails harmlessly and the script continues because it is not run under set -e.
Step 3: Build
source scripts/env.sh
export TEAM_CODE_ROOT=~/team_code
bash scripts/package_agent.sh build # -> leaderboard-user
bash scripts/package_agent.sh build --ros noetic # -> leaderboard-user:ros-noetic
The wrapper checks the roots, warns about the egg layout and about copying a huge
TEAM_CODE_ROOT (model weights inflate the image fast), then calls the repo's
make_docker.sh. Supported ROS distros are exactly melodic, noetic, foxy —
anything else prints the usage and exits.
Set the agent-specific values in the image by editing the block in
scripts/Dockerfile.master:
ENV TEAM_AGENT ${TEAM_CODE_ROOT}/my_agent.py
# ENV TEAM_CONFIG ${TEAM_CODE_ROOT}/config.json
ENV CHALLENGE_TRACK_CODENAME SENSORS
Step 4: Verify before submitting
bash scripts/package_agent.sh verify # imports + agent class inside the image
bash scripts/package_agent.sh shell # interactive poke around
verify runs the image and checks, inside it: carla, agents, srunner and
leaderboard all import; TEAM_AGENT exists and defines the class the evaluator
will derive from its filename; and the declared track is valid. That is the whole
class of failures that otherwise comes back as a rejected submission hours later.
A full local dry run is better still — same image, your own server:
bash scripts/package_agent.sh run --routes-subset 0
Step 5: Submit
Submission is through the leaderboard website (https://leaderboard.carla.org/submit/): push the image to a registry and provide the tag. Read the current instructions there — the mechanics (registry, quotas, allowed track) change between challenge rounds and are not in the repository.
Examples
Example 1: "build the docker image for my agent"
export TEAM_CODE_ROOT=~/team_code, check_env.sh, edit the Dockerfile's
TEAM_AGENT, build, then verify.
Example 2: "make_docker.sh fails on the mv of the egg"
Your CARLA is wheel-only. Use a release tarball for CARLA_ROOT, or copy the
wheel into the image and install it in the Dockerfile instead of relying on the egg.
Example 3: "my ROS agent needs the bridge"
export CARLA_ROS_BRIDGE_ROOT=~/ros-bridge (cloned with
--recurse-submodules -b leaderboard-2.1), then build --ros noetic, which uses
Dockerfile.ros and copies the bridge into the image.
Example 4: "the image builds but the submission is rejected"
Almost always sensors or the agent class. verify catches both;
[[write-leaderboard-agent]] validate catches the sensor budget specifically.
Troubleshoo
FAQ
What does the Leaderboard evaluate?
A Docker image rather than a repository, so the build bundles the simulator tools and your code into it.
What is the egg problem?
The build script fails when the simulator's Python package files do not match the names it expects, so the skill checks this first.
What does it check before submission?
The four required folders, the egg layout, and whether the image can import the stack and load the agent.
Details
Original description by the author
Packages an agent for CARLA Leaderboard submission — builds the docker image with make_docker.sh (plain or ROS variant), checks the four required roots and the egg layout it assumes, sets the agent/track/routes environment inside the image, and verifies the image can import the stack and load the agent before submission. Use when the user asks to "build the leaderboard docker image", "submit to the leaderboard", "package my agent", or make_docker.sh fails.
repo: carla-simulator/carla
Popularity
- GitHub stars
- 15k
- Ranking position
- #11080
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
create-leaderboard-route
15kHelps your agent build CARLA Leaderboard route files by placing waypoints and scenario triggers from the simulator camera, then checking and ordering them.
read-leaderboard-results
15kHelps your agent read a CARLA Leaderboard results file, explain each route's score and infractions, and rescore a run under the other rule version.
run-leaderboard-evaluation
15kHelps your agent run the CARLA Leaderboard evaluator on a set of routes with your driving agent, checking the setup first and saving checkpoints you can resume.
write-leaderboard-agent
15kHelps your agent write a driving agent for the CARLA Leaderboard, with the correct class, a sensor setup within the track limits, and a working starting file.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.