Skip to content

Commit 761cdbd

Browse files
Merge pull request #120 from motional/nuplan-devkit-v0.6
Nuplan devkit v0.6
2 parents d12f45b + ffe3fae commit 761cdbd

363 files changed

Lines changed: 12662 additions & 3963 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
tutorials
2+
.pytest_cache
3+
docs
4+
.git
5+
bazel-bin
6+
bazel-nuplan_devkit
7+
bazel-out
8+
bazel-testlogs
9+
.ipynb_checkpoints

.env

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# Common variables
2-
NUPLAN_TEST_MAPS_VERSION="nuplan-maps-v1.0"
3-
2+
export NUPLAN_TEST_MAPS_VERSION="nuplan-maps-v1.0"
3+
export NUPLAN_DATA_STORE='local'
44
# Simulation variables
5-
SIMULATION_CONTAINER_PORT=50050
6-
SIMULATION_IMAGE="nuplan/nuplan"
5+
export SIMULATION_CONTAINER_PORT=50050
6+
export SIMULATION_IMAGE="nuplan/nuplan"
77

88
# Submission variables
9-
SUBMISSION_CONTAINER_PORT=50051
10-
SUBMISSION_IMAGE="test-contestant/nuplan-test-submission"
9+
export SUBMISSION_CONTAINER_PORT=50051
10+
export CONTESTANT_ID="test"
11+
export SUBMISSION_ID="contestant"
12+
13+
export SUBMISSION_IMAGE="nuplan/test-submission"

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Bug report
3-
about: Create a report to help us improve
3+
about: Create a report to help us improve.
44
title: ''
55
labels: ''
66
assignees: ''

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Feature request
3-
about: Suggest an idea for this project
3+
about: Suggest an idea for this project.
44
title: ''
55
labels: ''
66
assignees: ''
File renamed without changes.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ _ext
3030
*.swp
3131
.tox/*
3232
.pytest_cache/*
33+
docs/_build/
34+
docs/generated/

Dockerfile

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ RUN curl -fsSL https://bazel.build/bazel-release.pub.gpg | apt-key add - \
1616
zip \
1717
nvidia-container-toolkit \
1818
software-properties-common \
19+
awscli \
1920
&& rm -rf /var/lib/apt/lists/*
2021

2122
# Download miniconda and install silently.
@@ -29,22 +30,49 @@ RUN curl -fsSLo Miniconda3-latest-Linux-x86_64.sh https://repo.anaconda.com/mini
2930
ARG NUPLAN_HOME=/nuplan_devkit
3031
WORKDIR $NUPLAN_HOME
3132

32-
COPY requirements.txt requirements_torch.txt /nuplan_devkit/
33-
RUN bash -c "python -m pip install --upgrade pip --pre && \
34-
pip install --no-cache-dir -r $NUPLAN_HOME/requirements_torch.txt -f https://download.pytorch.org/whl/torch_stable.html \
35-
pip install --no-cache-dir -r $NUPLAN_HOME/requirements.txt -f https://download.pytorch.org/whl/torch_stable.html"
33+
COPY requirements.txt requirements_torch.txt environment.yml /nuplan_devkit/
34+
RUN conda env create -f $NUPLAN_HOME/environment.yml
3635

3736
RUN mkdir -p $NUPLAN_HOME/nuplan
3837

3938
COPY setup.py $NUPLAN_HOME
4039
COPY nuplan $NUPLAN_HOME/nuplan
4140

41+
SHELL ["conda", "run", "-n", "nuplan", "/bin/bash", "-c"]
42+
4243
RUN bash -c "pip install -e ."
4344

4445
ENV NUPLAN_MAPS_ROOT=/data/sets/nuplan/maps \
4546
NUPLAN_DATA_ROOT=/data/sets/nuplan \
4647
NUPLAN_EXP_ROOT=/data/exp/nuplan
4748

48-
RUN mkdir -p {$NUPLAN_MAPS_ROOT, $NUPLAN_DATA_ROOT, $NUPLAN_EXP_ROOT}
49+
RUN bash -c 'mkdir -p {$NUPLAN_MAPS_ROOT,$NUPLAN_DATA_ROOT,$NUPLAN_EXP_ROOT}'
50+
51+
ARG NUPLAN_DATA_ROOT_S3_URL
52+
ARG NUPLAN_MAPS_ROOT_S3_URL
53+
ARG AWS_ACCESS_KEY_ID
54+
ARG AWS_SECRET_ACCESS_KEY
55+
ARG NUPLAN_SERVER_S3_ROOT_URL
56+
ARG NUPLAN_SERVER_AWS_ACCESS_KEY_ID
57+
ARG NUPLAN_SERVER_AWS_SECRET_ACCESS_KEY
58+
ARG S3_TOKEN_DIR
59+
ARG NUPLAN_DATA_STORE
60+
61+
ENV NUPLAN_DATA_ROOT $NUPLAN_DATA_ROOT
62+
ENV NUPLAN_MAPS_ROOT $NUPLAN_MAPS_ROOT
63+
ENV NUPLAN_DB_FILES /data/sets/nuplan/nuplan-v1.0/mini
64+
ENV NUPLAN_MAP_VERSION "nuplan-maps-v1.0"
65+
ENV NUPLAN_DATA_STORE $NUPLAN_DATA_STORE
66+
ENV NUPLAN_S3_PROFILE "default"
67+
ENV NUPLAN_DATA_ROOT_S3_URL $NUPLAN_DATA_ROOT_S3_URL
68+
ENV NUPLAN_MAPS_ROOT_S3_URL $NUPLAN_MAPS_ROOT_S3_URL
69+
ENV AWS_ACCESS_KEY_ID $AWS_ACCESS_KEY_ID
70+
ENV AWS_SECRET_ACCESS_KEY $AWS_SECRET_ACCESS_KEY
71+
ENV NUPLAN_SERVER_AWS_ACCESS_KEY_ID $NUPLAN_SERVER_AWS_ACCESS_KEY_ID
72+
ENV NUPLAN_SERVER_AWS_SECRET_ACCESS_KEY $NUPLAN_SERVER_AWS_SECRET_ACCESS_KEY
73+
ENV NUPLAN_SERVER_S3_ROOT_URL $NUPLAN_SERVER_S3_ROOT_URL
74+
ENV S3_TOKEN_DIR $S3_TOKEN_DIR
75+
76+
RUN bash -c 'mkdir -p $NUPLAN_DB_FILES'
4977

50-
CMD ["/bin/bash"]
78+
CMD ["/nuplan_devkit/nuplan/entrypoint_simulation.sh"]

Dockerfile.result_processor

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM 300189864575.dkr.ecr.us-east-1.amazonaws.com/nuplan-evalservice-client
2+
3+
ARG EVALAI_CHALLENGE_PK
4+
ARG EVALAI_PERSONAL_AUTH_TOKEN
5+
6+
ENV EVALAI_CHALLENGE_PK $EVALAI_CHALLENGE_PK
7+
ENV EVALAI_PERSONAL_AUTH_TOKEN $EVALAI_PERSONAL_AUTH_TOKEN
8+
9+
CMD ["/nuplan_devkit/nuplan/entrypoint_result_processor.sh"]

Dockerfile.submission

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,27 @@ RUN curl -fsSLo Miniconda3-latest-Linux-x86_64.sh https://repo.anaconda.com/mini
2929
ARG NUPLAN_HOME=/nuplan_devkit
3030
WORKDIR $NUPLAN_HOME
3131

32-
COPY requirements.txt requirements_submission.txt $NUPLAN_HOME/
32+
COPY requirements.txt requirements_torch.txt requirements_submission.txt $NUPLAN_HOME/
3333

3434
RUN bash -c "python -m pip install --upgrade pip --pre && \
35+
pip install --no-cache-dir -r $NUPLAN_HOME/requirements_torch.txt -f https://download.pytorch.org/whl/torch_stable.html && \
3536
pip install --no-cache-dir -r $NUPLAN_HOME/requirements.txt -f https://download.pytorch.org/whl/torch_stable.html && \
3637
pip install --no-cache-dir -r $NUPLAN_HOME/requirements_submission.txt"
3738

3839
RUN mkdir -p $NUPLAN_HOME/nuplan
3940

4041
COPY setup.py $NUPLAN_HOME
4142
COPY nuplan $NUPLAN_HOME/nuplan
43+
# You can copy your own files with the following command.
44+
# $NUPLAN_HOME Here represents the absolute path /nuplan_devkit inside the container
45+
# COPY my_fabulous_model.ckpt $NUPLAN_HOME
4246

4347
RUN bash -c "pip install -e ."
4448

4549
ENV NUPLAN_MAPS_ROOT=/data/sets/nuplan/maps \
4650
NUPLAN_DATA_ROOT=/data/sets/nuplan \
4751
NUPLAN_EXP_ROOT=/data/exp/nuplan
4852

49-
CMD ["/bin/bash", "-c", "python nuplan/submission/submission_planner.py"]
53+
RUN bash -c 'mkdir -p {$NUPLAN_MAPS_ROOT,$NUPLAN_DATA_ROOT,$NUPLAN_EXP_ROOT}'
54+
55+
CMD ["/nuplan_devkit/nuplan/entrypoint_submission.sh"]

docker-compose.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,47 @@ version: "3.7"
33
x-nuplan-volumes: &x-nuplan-volumes
44
volumes:
55
- "$NUPLAN_DATA_ROOT:/data/sets/nuplan:rw"
6+
- "$NUPLAN_EXP_ROOT:/data/exp/nuplan:rw"
7+
8+
9+
x-nuplan-maps: &x-nuplan-maps
10+
volumes:
11+
- "$NUPLAN_MAPS_ROOT:/data/sets/nuplan/maps:rw"
612

713

814
services:
915
submission:
10-
<<: *x-nuplan-volumes
11-
container_name: "test-contestant_nuplan-test-submission"
16+
<<: *x-nuplan-maps
1217
image: ${SUBMISSION_IMAGE}
18+
build:
19+
context: ./
20+
dockerfile: Dockerfile.submission
1321
env_file:
1422
- .env
15-
ports:
16-
- ${SUBMISSION_CONTAINER_PORT}:${SUBMISSION_CONTAINER_PORT}
17-
23+
network_mode: "host"
1824
tty: true
25+
deploy:
26+
resources:
27+
reservations:
28+
devices:
29+
- driver: nvidia
30+
count: 1
31+
capabilities: ["gpu"]
32+
entrypoint: /nuplan_devkit/nuplan/entrypoint_submission.sh
1933

2034
simulation:
2135
<<: *x-nuplan-volumes
36+
image: ${SIMULATION_IMAGE}
37+
build:
38+
context: ./
39+
dockerfile: Dockerfile
2240
env_file:
2341
- .env
2442
environment:
2543
'NUPLAN_CHALLENGE': $NUPLAN_CHALLENGE
2644
'NUPLAN_PLANNER': $NUPLAN_PLANNER
27-
image: ${SIMULATION_IMAGE}
28-
ports:
29-
- ${SIMULATION_CONTAINER_PORT}:${SIMULATION_CONTAINER_PORT}
30-
tty: true
45+
46+
network_mode: "host"
3147
depends_on:
3248
- submission
33-
entrypoint: /nuplan_devkit/nuplan/entrypoint.sh
49+
entrypoint: /nuplan_devkit/nuplan/entrypoint_simulation.sh

0 commit comments

Comments
 (0)