11FROM nvidia/cudagl:9.0-devel
22
3- RUN apt-get update
4- RUN apt-get install \
3+ RUN apt-get update && apt-get install -y --no-install-recommends \
54 sudo \
65 libglu1-mesa-dev \
76 xdg-user-dirs \
87 pulseaudio \
9- sudo \
108 x11-xserver-utils \
119 unzip \
1210 wget \
1311 software-properties-common \
14- -y --no-install-recommends
15-
16- RUN apt-add-repository ppa:deadsnakes/ppa
17- RUN apt-get update
18- RUN apt-get install -y \
19- python3.6 \
20- python3-pip
21-
22- RUN python3.6 -m pip install --upgrade pip
12+ ca-certificates \
13+ && rm -rf /var/lib/apt/lists/*
2314
24- RUN python3.6 -m pip install setuptools wheel
15+ # python3.6 is no longer available (issue #9778). Use deadsnakes Python 3.8 when present;
16+ # otherwise fall back to the distro python3 package.
17+ RUN apt-get update \
18+ && (apt-add-repository -y ppa:deadsnakes/ppa || true) \
19+ && apt-get update \
20+ && (apt-get install-y python3.8 python3.8-distutils \
21+ || apt-get install -y python3 python3-pip) \
22+ && if command -v python3.8 >/dev/null 2>&1; then \
23+ update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 || true; \
24+ python3.8 -m pip install --upgrade pip setuptools wheel || python3 -m pip install --upgrade pip setuptools wheel; \
25+ else \
26+ python3 -m pip install --upgrade pip setuptools wheel; \
27+ fi \
28+ && rm -rf /var/lib/apt/lists/*
2529
26- RUN adduser --force-badname --disabled-password --gecos '' --shell /bin/bash airsim_user && \
27- echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
28- adduser airsim_user sudo && \
29- adduser airsim_user audio && \
30+ RUN adduser --force-badname --disabled-password --gecos '' --shell /bin/bash airsim_user && \
31+ echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
32+ adduser airsim_user sudo && \
33+ adduser airsim_user audio && \
3034 adduser airsim_user video
3135
3236USER airsim_user
3337WORKDIR /home/airsim_user
3438
3539# Change the following values to use a different AirSim binary
3640# Also change the AIRSIM_EXECUTABLE variable in docker-entrypoint.sh
37- ENV AIRSIM_BINARY_ZIP_URL=https://github.com/microsoft/AirSim/releases/download/v1.3.1-linux/Blocks.zip
41+ ENV AIRSIM_BINARY_ZIP_URL=https://github.com/microsoft/AirSim/releases/download/v1.3.1-linux/Blocks.zip
3842ENV AIRSIM_BINARY_ZIP_FILENAME=Blocks.zip
3943
4044ENV SDL_VIDEODRIVER_VALUE=offscreen
4145ENV SDL_HINT_CUDA_DEVICE=0
4246
43- # Download and unzip the AirSim binary
44- RUN wget -c $AIRSIM_BINARY_ZIP_URL
45- RUN unzip $AIRSIM_BINARY_ZIP_FILENAME
46- RUN rm $AIRSIM_BINARY_ZIP_FILENAME
47+ RUN wget -c $AIRSIM_BINARY_ZIP_URL \
48+ && unzip $AIRSIM_BINARY_ZIP_FILENAME \
49+ && rm $AIRSIM_BINARY_ZIP_FILENAME
4750
48- # Add the Python app to the image
4951ADD ./app /home/airsim_user/app
5052
5153WORKDIR /home/airsim_user
@@ -57,7 +59,6 @@ RUN sudo chown -R airsim_user /home/airsim_user
5759
5860WORKDIR /home/airsim_user/app
5961
60- # Install Python requirements
61- RUN python3.6 -m pip install -r requirements.txt
62+ RUN python3 -m pip install --user -r requirements.txt
6263
63- ENTRYPOINT /home/airsim_user/docker-entrypoint.sh
64+ ENTRYPOINT /home/airsim_user/docker-entrypoint.sh
0 commit comments