Skip to content

Commit

Permalink
Remove the need to install OpenGL dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
reyery committed Dec 16, 2024
1 parent f03bc2e commit 7c9d607
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,34 @@ FROM debian:12-slim AS build

RUN apt-get update && apt-get install -y \
cmake \
build-essential \
libgl1-mesa-dev \
libglu1-mesa-dev
build-essential

COPY . /Daysim
WORKDIR /Daysim

# create final build folder at root
RUN mkdir /build
# create build folders at root
RUN mkdir build /build

# only build required binaries
RUN mkdir build \
&& cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_HEADLESS=ON -DUSE_OPENGL=ON /Daysim \
RUN cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release /Daysim \
&& make ds_illum \
&& make epw2wea \
&& make gen_dc \
&& make oconv \
&& make radfiles2daysim \
&& cd bin \
&& mv ds_illum epw2wea gen_dc oconv radfiles2daysim /build
&& mv ds_illum epw2wea gen_dc oconv radfiles2daysim /build \
&& rm -rf ../../build/*

# uncommenting line in CMakeLists to build rtrace_dc
RUN sed -i 's/#add_definitions(-DDAYSIM)/add_definitions(-DDAYSIM)/' /Daysim/src/rt/CMakeLists.txt \
&& cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_HEADLESS=ON -DUSE_OPENGL=ON /Daysim \
&& cmake -DCMAKE_BUILD_TYPE=Release /Daysim \
&& make rtrace \
&& cd bin \
&& mv rtrace /build/rtrace_dc
&& mv rtrace /build/rtrace_dc \
&& rm -rf ../../build/*

FROM debian:12-slim AS run
COPY --from=build /build /Daysim
Expand Down

0 comments on commit 7c9d607

Please sign in to comment.