diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..447effb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM ubuntu:22.04 + +RUN /bin/bash -c "apt-get update -y \ + && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -yy -q python3-numpy python3-pygame python3-scipy python3-tqdm python3-pip python3-pandas\ + && rm -rf /var/lib/apt/lists/*" +RUN python3 -m pip install --user pygame_widgets + +RUN mkdir -p /root/coding-challenge-racer +WORKDIR /root/coding-challenge-racer + +COPY --link . . + +ENTRYPOINT [ "python3", "tournament.py", "Zandvoort"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d3794ad --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,23 @@ +services: + # Base image containing dependencies. + base: + image: racer + build: + context: . + dockerfile: Dockerfile + # Interactive shell + stdin_open: true + tty: true + # Networking and IPC for ROS 2 + network_mode: host + # Needed to display graphical applications + privileged: true + environment: + # Allows graphical programs in the container. + - DISPLAY=${DISPLAY} + - QT_X11_NO_MITSHM=1 + - NVIDIA_DRIVER_CAPABILITIES=all + volumes: + # Allows graphical programs in the container. + - /tmp/.X11-unix:/tmp/.X11-unix:rw + - ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority