Skip to content

Instantly share code, notes, and snippets.

@cmpute
Created February 8, 2023 00:58
Show Gist options
  • Save cmpute/30d9369b26675445e76b995d8fb56e6c to your computer and use it in GitHub Desktop.
Save cmpute/30d9369b26675445e76b995d8fb56e6c to your computer and use it in GitHub Desktop.
Docker file to build Carla with ssh key
FROM ubuntu:18.04
USER root
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update ; \
apt-get install -y wget software-properties-common && \
add-apt-repository ppa:ubuntu-toolchain-r/test && \
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add - && \
apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" && \
apt-get update ; \
apt-get install -y build-essential \
clang-8 \
lld-8 \
g++-7 \
cmake \
ninja-build \
libvulkan1 \
python \
python-pip \
python-dev \
python3-dev \
python3-pip \
libpng-dev \
libtiff5-dev \
libjpeg-dev \
tzdata \
sed \
curl \
unzip \
autoconf \
libtool \
rsync \
libxml2-dev \
git \
aria2 && \
pip3 install -Iv setuptools==47.3.1 && \
pip3 install distro && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-8/bin/clang++ 180 && \
update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-8/bin/clang 180
RUN useradd -m carla
COPY --chown=carla:carla . /home/carla
USER carla
WORKDIR /home/carla
ENV UE4_ROOT /home/carla/UE4.26
RUN chmod 600 /home/carla/id_personal
RUN mkdir -p /home/carla/.ssh
RUN ssh-keyscan github.com >> /home/carla/.ssh/known_hosts
RUN git clone --depth 1 -b carla [email protected]:CarlaUnreal/UnrealEngine.git --config core.sshCommand="ssh -i /home/carla/id_personal" ${UE4_ROOT}
RUN rm /home/carla/id_personal
RUN cd $UE4_ROOT && \
./Setup.sh && \
./GenerateProjectFiles.sh && \
make
WORKDIR /home/carla/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment