-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Docker file to run independent of host OS
I got spooked by the --break-system-packages flag
- Loading branch information
1 parent
be43587
commit 204a3a1
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |