forked from iic-jku/IIC-OSIC-TOOLS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·457 lines (374 loc) · 17.5 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
#######################################################################
# Setup base image
#######################################################################
ARG BASE_IMAGE=rockylinux:9.0
FROM ${BASE_IMAGE} as base
ADD images/base/scripts/dependencies.sh dependencies.sh
RUN bash dependencies.sh
#######################################################################
# Compile magic (part of OpenLane)
#######################################################################
FROM base as magic
ARG MAGIC_REPO_URL="https://github.com/rtimothyedwards/magic"
ARG MAGIC_REPO_COMMIT="94daf986ab9aa94a9ae2ac3539fa5def9bd2a1ac"
ARG MAGIC_NAME="magic"
ADD images/magic/scripts/install.sh install.sh
ADD images/magic/magic-cheatsheet.txt magic-cheatsheet.txt
RUN bash install.sh
#######################################################################
# Compile iic-osic
#######################################################################
FROM magic as iic-osic
ARG IIC_OSIC_REPO_URL="https://github.com/iic-jku/iic-osic.git"
ARG IIC_OSIC_REPO_COMMIT="7e9433ff930955ca90415f141263213f81cac4f1"
ARG IIC_OSIC_NAME="iic-osic"
ADD images/iic-osic/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# create sky130 (part of OpenLane)
#######################################################################
#FROM magic as sky130
#ARG SKY130_REPO_URL="https://github.com/google/skywater-pdk.git"
#ARG SKY130_REPO_COMMIT="f70d8ca46961ff92719d8870a18a076370b85f6c"
#ARG SKY130_NAME="skywater-pdk"
#
#ENV PDK_ROOT=/foss/pdks
#
#COPY images/skywater-pdk/corners/corners.yml /foss/pdks/corners.yml
#COPY images/skywater-pdk/corners/make_timing.py /foss/pdks/make_timing.py
#
#ADD images/skywater-pdk/scripts/install.sh install.sh
#RUN bash install.sh
#######################################################################
# Create open_pdks (part of OpenLane)
#######################################################################
#FROM sky130 as open_pdks
FROM iic-osic as open_pdks
ARG OPEN_PDKS_REPO_URL="https://github.com/RTimothyEdwards/open_pdks"
ARG OPEN_PDKS_REPO_COMMIT="0059588eebfc704681dc2368bd1d33d96281d10f"
ARG OPEN_PDKS_NAME="open_pdks"
ENV PDK_ROOT=/foss/pdks
#ADD images/open_pdks/scripts/install.sh install.sh
#RUN bash install.sh
ADD images/open_pdks/scripts/install_volare.sh install_volare.sh
RUN bash install_volare.sh
#######################################################################
# Compile covered
#######################################################################
FROM base as covered
ARG COVERED_REPO_URL="https://github.com/hpretl/verilog-covered"
ARG COVERED_REPO_COMMIT="19d30fc942642b14dc24e95331cd4777c8dcbad9"
ARG COVERED_NAME="covered"
ADD images/covered/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile cvc_rv (part of OpenLane)
#######################################################################
FROM base as cvc_rv
ARG CVC_RV_REPO_URL="https://github.com/d-m-bailey/cvc"
ARG CVC_RV_REPO_COMMIT="df85a637e83da870129c93c8793cad282bb8ddd1"
ARG CVC_RV_NAME="cvc_rv"
ADD images/cvc_rv/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile fault
#######################################################################
# FIXME build dependencies clean as stand-alone stages
FROM base as fault
ARG FAULT_REPO_URL="https://github.com/Cloud-V/Fault"
ARG FAULT_REPO_COMMIT="080f4be01d236af438566ce0b28089531f21a997"
ARG FAULT_NAME="fault"
ADD images/fault/scripts/dependencies.sh dependencies.sh
RUN bash dependencies.sh
ADD images/fault/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile gaw3-xschem
#######################################################################
FROM base as gaw3-xschem
ARG GAW3_XSCHEM_REPO_URL="https://github.com/StefanSchippers/xschem-gaw.git"
ARG GAW3_XSCHEM_REPO_COMMIT="854bee4cf20663a632840256737d0d68b5eca417"
ARG GAW3_XSCHEM_NAME="gaw3-xschem"
ADD images/gaw3-xschem/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile GDS3D
#######################################################################
FROM open_pdks as gds3d
ARG GDS3D_REPO_URL="https://github.com/trilomix/GDS3D.git"
ARG GDS3D_REPO_COMMIT="173da0cc2f3804984b7e77862fbb0c3f4e308a4b"
ARG GDS3D_NAME="gds3d"
ADD images/gds3d/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile ghdl
#######################################################################
FROM base as ghdl
ARG GHDL_REPO_URL="https://github.com/ghdl/ghdl.git"
ARG GHDL_REPO_COMMIT="v2.0.0"
ARG GHDL_NAME="ghdl"
ADD images/ghdl/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile gtkwave
#######################################################################
FROM base as gtkwave
ARG GTKWAVE_REPO_URL="https://github.com/gtkwave/gtkwave"
ARG GTKWAVE_REPO_COMMIT="7a0024d582341e2cb27d8cfecdaec5b89112b39e"
ARG GTKWAVE_NAME="gtkwave"
ADD images/gtkwave/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile irsim
#######################################################################
FROM base as irsim
ARG IRSIM_REPO_URL="https://github.com/rtimothyedwards/irsim"
ARG IRSIM_REPO_COMMIT="25fe8217663c06a141156c2e9255e243d308794a"
ARG IRSIM_NAME="irsim"
ADD images/irsim/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile iverilog
#######################################################################
FROM base as iverilog
ARG IVERILOG_REPO_URL="https://github.com/steveicarus/iverilog.git"
ARG IVERILOG_REPO_COMMIT="74c52d6fa15d3f54403d95c662a68edd4bcb9af6"
ARG IVERILOG_NAME="iverilog"
ADD images/iverilog/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile klayout (part of OpenLane)
#######################################################################
FROM base as klayout
ARG KLAYOUT_REPO_URL="https://github.com/KLayout/klayout"
ARG KLAYOUT_REPO_COMMIT="428d0fe8c941faece4eceebc54170cc04d916c03"
ARG KLAYOUT_NAME="klayout"
ADD images/klayout/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile netgen (part of OpenLane)
#######################################################################
FROM base as netgen
ARG NETGEN_REPO_URL="https://github.com/rtimothyedwards/netgen"
ARG NETGEN_REPO_COMMIT="3aeea9d1642c8d87911ed13626c77e4888caa9eb"
ARG NETGEN_NAME="netgen"
ADD images/netgen/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile ngspice
#######################################################################
FROM base as ngspice
ARG NGSPICE_REPO_URL="https://git.code.sf.net/p/ngspice/ngspice"
ARG NGSPICE_REPO_COMMIT="ngspice-38"
ARG NGSPICE_NAME="ngspice"
ADD images/ngspice/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile ngspice shared library
# FIXE Compiling the shared library in one run together with ngspice
# does not work. Maybe patch build script.
#######################################################################
FROM base as libngspice
ARG NGSPICE_REPO_URL="https://git.code.sf.net/p/ngspice/ngspice"
ARG NGSPICE_REPO_COMMIT="ngspice-37"
ARG NGSPICE_NAME="ngspice"
ADD images/libngspice/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile nvc (VHDL simulator)
#######################################################################
FROM base as nvc
ARG NVC_REPO_URL="https://github.com/nickg/nvc"
ARG NVC_REPO_COMMIT="4efbf71640e7366ee35e7567de4b51d23572ddf2"
ARG NVC_NAME="nvc"
ADD images/nvc/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile openlane (part of OpenLane)
#######################################################################
FROM base as openlane
ARG OPENLANE_REPO_URL="https://github.com/The-OpenROAD-Project/OpenLane"
ARG OPENLANE_REPO_COMMIT="2022.11.02"
ARG OPENLANE_NAME="openlane"
ADD images/openlane/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile openroad (part of OpenLane)
#######################################################################
FROM base as openroad_app
ARG OPENROAD_APP_REPO_URL="https://github.com/The-OpenROAD-Project/OpenROAD.git"
ARG OPENROAD_APP_REPO_COMMIT="127815b81a8624caebc06d0bedc2ea3a22e90500"
ARG OPENROAD_APP_NAME="openroad"
ADD images/openroad/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile opensta (part of OpenLane)
#######################################################################
FROM base as opensta
ARG OPENSTA_REPO_URL="https://github.com/The-OpenROAD-Project/OpenSTA"
ARG OPENSTA_REPO_COMMIT="489ffac144d5661b963105f89cb9097e1fd2f8cf"
ARG OPENSTA_NAME="opensta"
ADD images/opensta/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile padring (part of OpenLane)
#######################################################################
FROM base as padring
ARG PADRING_REPO_URL="https://github.com/donn/padring"
ARG PADRING_REPO_COMMIT="b2a64abcc8561d758c0bcb3945117dcb13bd9dca"
ARG PADRING_NAME="padring"
ADD images/padring/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile helper files (part of QFLOW)
#######################################################################
FROM base as qflow
ARG QFLOW_REPO_URL="https://github.com/RTimothyEdwards/qflow.git"
ARG QFLOW_REPO_COMMIT="a550469b63e910ede6e3022e2886bca96462c540"
ARG QFLOW_NAME="qflow"
ADD images/qflow/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile riscv-gnu-toolchain-rv32i
#######################################################################
FROM base as riscv-gnu-toolchain-rv32i
ARG RISCV_GNU_TOOLCHAIN_RV32I_REPO_URL="https://github.com/riscv-collab/riscv-gnu-toolchain.git"
ARG RISCV_GNU_TOOLCHAIN_RV32I_REPO_COMMIT="f62900f19330b0279a74af48366eb2863a9c9196"
ARG RISCV_GNU_TOOLCHAIN_RV32I_NAME="riscv-gnu-toolchain-rv32i"
ADD images/riscv-gnu-toolchain-rv32i/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile verilator
#######################################################################
FROM base as verilator
ARG VERILATOR_REPO_URL="https://github.com/verilator/verilator"
ARG VERILATOR_REPO_COMMIT="v5.002"
ARG VERILATOR_NAME="verilator"
ADD images/verilator/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile xschem
#######################################################################
FROM base as xschem
ARG XSCHEM_REPO_URL="https://github.com/StefanSchippers/xschem.git"
ARG XSCHEM_REPO_COMMIT="0b863993b1527679bfe839d3c94bec2d7f7e3db5"
ARG XSCHEM_NAME="xschem"
ADD images/xschem/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile xyce & xyce-xdm
#######################################################################
# FIXME build trilinos as own image, clean with commit etc.
FROM base as xyce
ARG XYCE_REPO_URL="https://github.com/Xyce/Xyce.git"
ARG XYCE_REPO_COMMIT="Release-7.5.0"
ARG XYCE_NAME="xyce"
COPY images/xyce/scripts/trilinos.reconfigure.sh /trilinos.reconfigure.sh
COPY images/xyce/scripts/xyce.reconfigure.sh /xyce.reconfigure.sh
ADD images/xyce/scripts/install.sh install.sh
RUN bash install.sh
FROM xyce as xyce-xdm
ARG XYCE_XDM_REPO_URL="https://github.com/Xyce/XDM"
ARG XYCE_XDM_REPO_COMMIT="Release-2.5.0"
ARG XYCE_XDM_NAME="xyce-xdm"
ADD images/xyce-xdm/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile yosys (part of OpenLane) & yosys-ghdl-plugin
#######################################################################
FROM base as yosys
ARG YOSYS_REPO_URL="https://github.com/YosysHQ/yosys"
ARG YOSYS_REPO_COMMIT="6e907acf86d9ff0edd9a1c10274e62690e19e939"
ARG YOSYS_NAME="yosys"
ADD images/yosys/scripts/install.sh install.sh
RUN bash install.sh
FROM base as ghdl-yosys-plugin
ARG GHDL_YOSYS_PLUGIN_REPO_URL="https://github.com/ghdl/ghdl-yosys-plugin.git"
ARG GHDL_YOSYS_PLUGIN_REPO_COMMIT="c9b05e481423c55ffcbb856fd5296701f670808c"
ARG GHDL_YOSYS_PLUGIN_NAME="ghdl-yosys-plugin"
COPY --from=yosys /foss/tools/ /foss/tools/
COPY --from=ghdl /foss/tools/ /foss/tools/
ADD images/ghdl-yosys-plugin/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Final output container
#######################################################################
FROM base as iic-osic-tools
## Connection ports for controlling the UI:
# VNC port:5901
# noVNC webport, connect via http://IP:80/?password=start
ENV VNC_PORT=5901 \
NO_VNC_PORT=80
EXPOSE $VNC_PORT $NO_VNC_PORT
### Environment config
ENV HOME=/headless \
TERM=xterm \
STARTUPDIR=/dockerstartup \
NO_VNC_HOME=/dockerstartup/noVNC \
VNC_COL_DEPTH=24 \
VNC_RESOLUTION=1680x1050 \
VNC_PW=abc123 \
VNC_VIEW_ONLY=false \
DESIGNS=/foss/designs \
TOOLS=/foss/tools \
PDK_ROOT=/foss/pdks
ADD images/iic-osic-tools/scripts/ $STARTUPDIR/scripts
RUN find $STARTUPDIR/scripts -name '*.sh' -exec chmod a+x {} +
## Install all YUM and PIP packages, aswell as novnc from sources
RUN $STARTUPDIR/scripts/install.sh
### Copy xfce UI configuration
ADD images/iic-osic-tools/addons/xfce/ $HOME/
COPY --from=open_pdks /foss/pdks/ /foss/pdks/
COPY --from=covered /foss/tools/ /foss/tools/
COPY --from=cvc_rv /foss/tools/ /foss/tools/
COPY --from=fault /foss/tools/ /foss/tools/
COPY --from=fault /usr/lib/swift/linux/ /usr/lib/swift/linux/
COPY --from=gaw3-xschem /foss/tools/ /foss/tools/
COPY --from=gds3d /foss/tools/ /foss/tools/
COPY --from=gds3d /foss/pdks/ /foss/pdks/
COPY --from=ghdl /foss/tools/ /foss/tools/
COPY --from=gtkwave /foss/tools/ /foss/tools/
COPY --from=iic-osic /foss/tools/ /foss/tools/
COPY --from=irsim /foss/tools/ /foss/tools/
COPY --from=iverilog /foss/tools/ /foss/tools/
COPY --from=klayout /foss/tools/ /foss/tools/
COPY --from=magic /foss/tools/ /foss/tools/
COPY --from=netgen /foss/tools/ /foss/tools/
COPY --from=nvc /foss/tools/ /foss/tools/
COPY --from=ngspice /foss/tools/ /foss/tools/
COPY --from=libngspice /foss/tools/ /foss/tools/
COPY --from=openlane /foss/tools/ /foss/tools/
COPY --from=openroad_app /foss/tools/ /foss/tools/
COPY --from=opensta /foss/tools/ /foss/tools/
COPY --from=padring /foss/tools/ /foss/tools/
COPY --from=qflow /foss/tools/ /foss/tools/
COPY --from=riscv-gnu-toolchain-rv32i /foss/tools/ /foss/tools/
COPY --from=verilator /foss/tools/ /foss/tools/
COPY --from=xschem /foss/tools/ /foss/tools/
COPY --from=xyce /foss/tools/ /foss/tools/
COPY --from=xyce-xdm /foss/tools/ /foss/tools/
COPY --from=yosys /foss/tools/ /foss/tools/
COPY --from=ghdl-yosys-plugin /foss/tools_add/ /foss/tools/
ADD images/iic-osic-tools/addons/sak /foss/tools/sak
COPY images/iic-osic-tools/addons/.klayout/ /headless/.klayout/
COPY images/iic-osic-tools/addons/.gaw/ /headless/.gaw/
COPY images/iic-osic-tools/addons/examples /foss/examples
COPY images/iic-osic-tools/addons/.spiceinit /headless/.spiceinit
COPY images/iic-osic-tools/addons/spice.rc /headless/spice.rc
COPY images/iic-osic-tools/addons/.Xclients /headless/.Xclients
COPY tool_metadata.yml /
# This is needed by ngspyce
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/foss/tools/ngspice/ngspice/lib"
# Install ignamv/ngspyce python lib from source
ADD images/ngspyce/scripts/install.sh install_ngspyce.sh
RUN bash install_ngspyce.sh
# Copy bashrc into place
ADD images/iic-osic-tools/scripts/env.sh $HOME/.bashrc
# Finalize setup/install
RUN $STARTUPDIR/scripts/post_install.sh
### configure startup
RUN $STARTUPDIR/scripts/set_user_permission.sh $STARTUPDIR $HOME
WORKDIR $DESIGNS
USER 1000
ENTRYPOINT ["/dockerstartup/scripts/ui_startup.sh"]
CMD ["--wait"]