-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
48 lines (41 loc) · 1.44 KB
/
Dockerfile
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
FROM carlasim/carla:0.9.11 as carlasim
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -yq \
vim \
git \
cmake \
sudo \
python3.7 \
python3-dev \
python3-pip \
python3-opencv \
python3-setuptools \
protobuf-compiler \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /third-parties/carla
RUN python3.7 -m pip install --upgrade pip
COPY --from=carlasim /home/carla/PythonAPI/carla/dist/carla-0.9.11-py3.7-linux-x86_64.egg .
COPY --from=carlasim /home/carla/PythonAPI/examples/requirements.txt .
COPY --from=carlasim /home/carla/PythonAPI ./PythonAPI
RUN python3.7 -m easy_install carla-0.9.11-py3.7-linux-x86_64.egg && \
python3.7 -m pip install -r requirements.txt && \
rm carla-0.9.11-py3.7-linux-x86_64.egg requirements.txt
WORKDIR /simulator
COPY . .
RUN bash compile_proto.sh
RUN python3.7 -m pip install opencv-python
RUN python3.7 -m pip install -r ./scenario_runner/requirements.txt
RUN python3.7 -m pip install -r ./requirements.txt
ENV PYTHONPATH=/simulator/scenario_runner:/third-parties/carla/PythonAPI:/third-parties/carla/PythonAPI/carla
ENV SCENARIO_RUNNER_ROOT=/simulator/scenario_runner
RUN cd /usr/bin/ && \
rm python3 && \
ln -s python3.7 python3 && \
ln -s python3 python && \
useradd -m -s /bin/bash carla && \
usermod -aG sudo carla && \
echo "carla:carla" | chpasswd && \
chown -R carla:carla /simulator
USER carla