-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathDockerfile.submission
73 lines (57 loc) · 2.81 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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 - \
RUN curl -fsSL https://storage.googleapis.com/www.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 config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
RUN conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
RUN conda config --set show_channel_urls yes
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# RUN conda env create -f $NUPLAN_HOME/environment_submission.yml
RUN mkdir /opt/conda/envs/nuplan
COPY conda_env/nuplan /opt/conda/envs/nuplan
RUN ls /opt/conda/envs/
RUN mkdir $NUPLAN_HOME/transformer4planning
COPY transformer4planning $NUPLAN_HOME/transformer4planning
RUN pip install -e $NUPLAN_HOME/transformer4planning
RUN ls $NUPLAN_HOME/transformer4planning
COPY checkpoint-15000 $NUPLAN_HOME/checkpoint-15000
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}'
RUN apt-get update \
&& apt-get install -y \
awscli \
&& rm -rf /var/lib/apt/lists/*
CMD ["/nuplan_devkit/nuplan/entrypoint_submission.sh"]