diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..0a1cbd44a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +FROM ubuntu:22.04 as pbrt + +ENV DEBIAN_FRONTEND=noninteractive + +# Update the package lists +RUN apt-get update + +# Install any necessary packages for building the application +RUN apt-get install -y build-essential git cmake + +# Set the working directory +WORKDIR /app +RUN git clone --recursive https://github.com/huongoss/tev-docker.git + +RUN apt-get install -y xorg-dev libglu1-mesa-dev zlib1g-dev zenity + +# Set the working directory +WORKDIR /app/tev + +RUN cmake . -B build && \ + cmake --build build --config Release -j && \ + cp build/tev /usr/local/bin/ + + +# Specify the command to run when the container starts +ENTRYPOINT [ "/usr/local/bin/tev" ] \ No newline at end of file diff --git a/README.md b/README.md index dcfa00af3..cdd01325b 100644 --- a/README.md +++ b/README.md @@ -130,3 +130,8 @@ $ cpack --config build/CPackConfig.cmake ## License __tev__ is available under the BSD 3-clause license, which you can find in the `LICENSE.txt` file. [TL;DR](https://tldrlegal.com/license/bsd-3-clause-license-(revised)). + +## Docker +docker build . -t tev +xhost +local: +docker run --network=host --pid=host -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro --rm tev