Skip to content

Commit 9f67933

Browse files
committed
working on 24.04 (noble) support
1 parent 512c890 commit 9f67933

File tree

1 file changed

+227
-0
lines changed

1 file changed

+227
-0
lines changed

solstice-build/Dockerfile-noble

Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
# This dockerfile can be used to automatically build a full SOLSTICE setup on
2+
# Ubuntu, in a cleanroom environment. When the build has completed, there will
3+
# be a binary tarball ready for extraction from the image.
4+
#
5+
# To build SOLSTICE using this docker file,
6+
#
7+
# docker build -t solstice-jammy -f Dockerfile-jammy
8+
#
9+
# To extract the built file from the docker image, use
10+
# docker run --rm -it -v $(pwd):/host solstice-jammy sh -c "cp solstice-*.tar.gz /host"
11+
12+
FROM ubuntu:24.04
13+
14+
RUN useradd -s /bin/bash -m john
15+
RUN usermod -aG sudo john
16+
17+
ARG DEBIAN_FRONTEND=noninteractive
18+
RUN apt-get update && apt-get install -y sudo build-essential git wget vim lsb-release
19+
20+
RUN echo "username ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
21+
22+
RUN apt-get update && apt-get install -y cmake
23+
24+
WORKDIR /home/john
25+
26+
ENV MAKE_FLAGS="-j7"
27+
ENV BUILD_TYPE="RELEASE"
28+
#ENV BUILD_TYPE="DEBUG"
29+
30+
# RCMAKE
31+
ENV VER_RCMAKE=0.4
32+
RUN sudo su john -c "git clone https://gitlab.com/vaplv/rcmake.git"
33+
WORKDIR /home/john/rcmake
34+
35+
RUN sudo su john -c "git checkout tags/$VER_RCMAKE"
36+
WORKDIR /home/john/rcmake/cmake
37+
RUN sudo su john -c "cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE . && make $MAKE_FLAGS"
38+
RUN sudo su john -c "make DESTDIR=~/install install"
39+
RUN make install
40+
41+
# RSYS
42+
ENV VER_RSYS=0.12
43+
WORKDIR /home/john/
44+
RUN sudo su john -c "git clone https://gitlab.com/vaplv/rsys.git"
45+
RUN ls -l
46+
WORKDIR /home/john/rsys
47+
RUN sudo su john -c "git checkout tags/$VER_RSYS"
48+
WORKDIR /home/john/rsys/cmake
49+
RUN sudo su john -c "cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE . && make $MAKE_FLAGS"
50+
RUN sudo su john -c "make DESTDIR=~/install install"
51+
RUN make install
52+
53+
# ISPC
54+
WORKDIR /home/john/
55+
RUN sudo su john -c "wget https://github.com/ispc/ispc/releases/download/v1.12.0/ispc-v1.12.0b-linux.tar.gz"
56+
RUN sudo su john -c "tar zxvf ispc-v1.12*-linux.tar.gz"
57+
WORKDIR /home/john/ispc-v1.12.0-linux
58+
ENV BIN_ISPC=/home/john/ispc-v1.12.0-linux/bin/ispc
59+
RUN sudo su john -c "$BIN_ISPC --version"
60+
61+
# EMBREE
62+
RUN apt-get install -y libtbb-dev libglfw3-dev freeglut3-dev libmagick++-dev cmake libopenimageio-dev pkg-config libjpeg-dev libpng-dev
63+
WORKDIR /home/john/
64+
#ENV VER_EMBREE=v2.17.7
65+
#ENV VER_EMBREE=v3.13.1
66+
ENV VER_EMBREE=v3.13.5
67+
RUN sudo su john -c "git clone https://github.com/embree/embree.git"
68+
WORKDIR /home/john/embree
69+
RUN sudo su john -c "git checkout $VER_EMBREE"
70+
RUN sudo su john -c "cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DEMBREE_ISPC_EXECUTABLE=$BIN_ISPC -DCMAKE_INSTALL_PREFIX=/usr/local"
71+
RUN sudo su john -c "make $MAKE_FLAGS"
72+
RUN sudo su john -c "make DESTDIR=~/install install"
73+
RUN make install
74+
75+
# STAR-3D
76+
WORKDIR /home/john
77+
ENV VER_STAR3D=tags/0.8.1
78+
RUN sudo su john -c "git clone https://gitlab.com/meso-star/star-3d.git"
79+
WORKDIR /home/john/star-3d
80+
RUN ls
81+
RUN sudo su john -c "git checkout $VER_STAR3D"
82+
WORKDIR /home/john/star-3d/cmake
83+
RUN sudo su john -c "cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=/usr/local . && make $MAKE_FLAGS"
84+
RUN sudo su john -c "make DESTDIR=~/install install"
85+
RUN make install
86+
87+
# RANDOM123 -- no installation
88+
ENV VER_RANDOM123=1.14.0
89+
WORKDIR /home/john
90+
RUN sudo su john -c "git clone https://github.com/DEShawResearch/random123.git"
91+
WORKDIR /home/john/random123
92+
RUN sudo su john -c "git tag"
93+
RUN sudo su john -c "git checkout tags/v$VER_RANDOM123"
94+
#WORKDIR /home/john/Random123-$VER_RANDOM123/examples
95+
#RUN sudo su john -c "make"
96+
97+
# STAR-SP
98+
WORKDIR /home/john
99+
ENV VER_STARSP=0.13
100+
RUN sudo su john -c "git clone https://gitlab.com/meso-star/star-sp.git"
101+
WORKDIR /home/john/star-sp
102+
RUN sudo su john -c "git checkout $VER_STARSP"
103+
WORKDIR /home/john/star-sp/cmake
104+
RUN sudo su john -c "cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DRandom123_INCLUDE_DIR=/home/john/random123/include . && make $MAKE_FLAGS"
105+
RUN sudo su john -c "make test"
106+
RUN sudo su john -c "make DESTDIR=~/install install"
107+
RUN make install
108+
109+
# STAR-3DUT
110+
WORKDIR /home/john
111+
ENV VER_STAR3DUT=0.3.2
112+
RUN sudo su john -c "git clone https://gitlab.com/meso-star/star-3dut.git"
113+
WORKDIR /home/john/star-3dut
114+
RUN sudo su john -c "git checkout tags/$VER_STAR3DUT"
115+
WORKDIR /home/john/star-3dut/cmake
116+
RUN sudo su john -c "cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE . && make $MAKE_FLAGS"
117+
RUN sudo su john -c "make test"
118+
RUN sudo su john -c "make DESTDIR=~/install install"
119+
RUN make install
120+
121+
# POLYGON
122+
WORKDIR /home/john
123+
ENV VER_POLYGON=0.1.2
124+
RUN sudo su john -c "git clone https://gitlab.com/vaplv/polygon.git"
125+
WORKDIR /home/john/polygon
126+
RUN sudo su john -c "git checkout tags/$VER_POLYGON"
127+
WORKDIR /home/john/polygon/cmake
128+
RUN sudo su john -c "cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE . && make $MAKE_FLAGS"
129+
RUN sudo su john -c "make test"
130+
RUN sudo su john -c "make DESTDIR=~/install install"
131+
RUN make install
132+
133+
# STAR-CPR
134+
WORKDIR /home/john
135+
ENV VER_STARCPR=0.1.2
136+
RUN apt-get install -y libpolyclipping-dev
137+
RUN sudo su john -c "git clone https://gitlab.com/meso-star/star-cpr.git"
138+
WORKDIR /home/john/star-cpr
139+
RUN sudo su john -c "git checkout tags/$VER_STARCPR"
140+
WORKDIR /home/john/star-cpr/cmake
141+
RUN sudo su john -c "cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE . && make $MAKE_FLAGS"
142+
RUN sudo su john -c "make test"
143+
RUN sudo su john -c "make DESTDIR=~/install install"
144+
RUN make install
145+
146+
# STAR-SF
147+
WORKDIR /home/john
148+
ENV VER_STARSF=0.8
149+
RUN sudo su john -c "git clone https://gitlab.com/meso-star/star-sf.git"
150+
WORKDIR /home/john/star-sf
151+
RUN sudo su john -c "git checkout tags/$VER_STARSF"
152+
WORKDIR /home/john/star-sf/cmake
153+
RUN sudo su john -c "cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE . && make $MAKE_FLAGS"
154+
RUN sudo su john -c "make test"
155+
RUN sudo su john -c "make DESTDIR=~/install install"
156+
RUN make install
157+
158+
# SOLSTICE-SOLVER
159+
WORKDIR /home/john
160+
ENV VER_SOLSTICESOLVER=0.9
161+
RUN sudo su john -c "git clone https://gitlab.com/meso-star/solstice-solver.git"
162+
WORKDIR /home/john/solstice-solver
163+
RUN sudo su john -c "git checkout tags/$VER_SOLSTICESOLVER"
164+
WORKDIR /home/john/solstice-solver/cmake
165+
RUN sudo su john -c "cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE . && make $MAKE_FLAGS"
166+
RUN sudo su john -c "make test"
167+
RUN sudo su john -c "make DESTDIR=~/install install"
168+
RUN make install
169+
170+
# SOLSTICE-ANIM
171+
WORKDIR /home/john
172+
ENV VER_SOLSTICEANIM=0.2.3
173+
RUN sudo su john -c "git clone https://gitlab.com/meso-star/solstice-anim.git"
174+
WORKDIR /home/john/solstice-anim
175+
RUN sudo su john -c "git checkout tags/$VER_SOLSTICEANIM"
176+
WORKDIR /home/john/solstice-anim/cmake
177+
RUN sudo su john -c "cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE . && make $MAKE_FLAGS"
178+
RUN sudo su john -c "make test"
179+
RUN sudo su john -c "make DESTDIR=~/install install"
180+
RUN make install
181+
182+
# STAR-STL
183+
WORKDIR /home/john
184+
ENV VER_STARSTL=0.3.3
185+
RUN sudo su john -c "git clone https://gitlab.com/meso-star/star-stl.git"
186+
WORKDIR /home/john/star-stl
187+
RUN sudo su john -c "git checkout tags/$VER_STARSTL"
188+
WORKDIR /home/john/star-stl/cmake
189+
RUN sudo su john -c "cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE . && make $MAKE_FLAGS"
190+
RUN sudo su john -c "make test"
191+
RUN sudo su john -c "make DESTDIR=~/install install"
192+
RUN make install
193+
194+
# SOLSTICE!!!
195+
RUN apt-get install -y libyaml-dev
196+
WORKDIR /home/john
197+
ENV VER_SOLSTICE=0.9.1
198+
RUN sudo su john -c "git clone https://gitlab.com/meso-star/solstice.git"
199+
WORKDIR /home/john/solstice
200+
RUN sudo su john -c "git checkout tags/$VER_SOLSTICE"
201+
WORKDIR /home/john/solstice/cmake
202+
RUN sudo su john -c "cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE . && make $MAKE_FLAGS"
203+
RUN sudo su john -c "make test"
204+
RUN sudo su john -c "make DESTDIR=~/install install"
205+
RUN make install
206+
207+
# CLEAN UP EMBREE BINS
208+
209+
RUN rm -rf /home/john/install/usr/local/bin/embree3
210+
211+
# TAR UP THE BINARY
212+
WORKDIR /home/john
213+
RUN cat /etc/lsb-release
214+
RUN uname -a
215+
#RUN ls install/usr/local/lib
216+
#RUN ldd install/usr/local/bin/solstice
217+
RUN . /etc/lsb-release \
218+
&& export DIRNAME="solstice-$VER_SOLSTICE-`uname -p`-$DISTRIB_CODENAME" \
219+
&& echo $DIRNAME \
220+
&& mv install $DIRNAME \
221+
&& tar zcvf $DIRNAME.tar.gz $DIRNAME/*
222+
223+
RUN ls -lh *.gz
224+
225+
LABEL description="Solstice $VER_SOLSTICE built on Ubuntu"
226+
227+

0 commit comments

Comments
 (0)