forked from motional/nuplan-devkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.submission
54 lines (40 loc) · 1.98 KB
/
Dockerfile.submission
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM nvidia/cuda:11.0.3-runtime-ubuntu20.04
RUN apt-get update \
&& apt-get install -y curl gnupg2 software-properties-common default-jdk
ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn
RUN curl -fsSL https://bazel.build/bazel-release.pub.gpg | apt-key add - \
&& curl -fsSL https://nvidia.github.io/nvidia-docker/gpgkey | apt-key add - \
&& curl -s -L https://nvidia.github.io/nvidia-docker/ubuntu20.04/nvidia-docker.list | tee /etc/apt/sources.list.d/nvidia-docker.list \
&& add-apt-repository "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" \
&& apt-get update \
&& apt-get install -y \
bazel \
file \
zip \
nvidia-container-toolkit \
software-properties-common \
&& rm -rf /var/lib/apt/lists/*
# Download miniconda and install silently.
ENV PATH /opt/conda/bin:$PATH
RUN curl -fsSLo Miniconda3-latest-Linux-x86_64.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda && \
rm Miniconda3-latest-Linux-x86_64.sh && \
conda clean -a -y
# Setup working environement
ARG NUPLAN_HOME=/nuplan_devkit
WORKDIR $NUPLAN_HOME
COPY requirements.txt requirements_torch.txt requirements_submission.txt environment_submission.yml /nuplan_devkit/
RUN conda env create -f $NUPLAN_HOME/environment_submission.yml
RUN mkdir -p $NUPLAN_HOME/nuplan
COPY setup.py $NUPLAN_HOME
COPY nuplan $NUPLAN_HOME/nuplan
SHELL ["conda", "run", "-n", "nuplan", "/bin/bash", "-c"]
# You can copy your own files with the following command.
# $NUPLAN_HOME Here represents the absolute path /nuplan_devkit inside the container
# COPY my_fabulous_model.ckpt $NUPLAN_HOME
RUN bash -c "pip install -e ."
ENV NUPLAN_MAPS_ROOT=/data/sets/nuplan/maps \
NUPLAN_DATA_ROOT=/data/sets/nuplan \
NUPLAN_EXP_ROOT=/data/exp/nuplan
RUN bash -c 'mkdir -p {$NUPLAN_MAPS_ROOT,$NUPLAN_DATA_ROOT,$NUPLAN_EXP_ROOT}'
CMD ["/nuplan_devkit/nuplan/entrypoint_submission.sh"]