forked from iic-jku/IIC-OSIC-TOOLS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
423 lines (381 loc) · 17.8 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
#######################################################################
# Setup base image
#######################################################################
ARG BASE_IMAGE=ubuntu:jammy
FROM ${BASE_IMAGE} as base
ARG CONTAINER_TAG=unknown
ENV IIC_OSIC_TOOLS_VERSION=${CONTAINER_TAG} \
DEBIAN_FRONTEND=noninteractive \
TZ=Europe/Vienna \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
TOOLS=/foss/tools \
PDK_ROOT=/foss/pdks \
DESIGNS=/foss/designs \
EXAMPLES=/foss/examples
COPY images/base/scripts/dependencies.sh dependencies.sh
RUN bash dependencies.sh
#######################################################################
# Add base packages (install via pip, npm, or gem)
#######################################################################
FROM base as basepkg
COPY images/base/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile magic (part of OpenLane)
#######################################################################
FROM basepkg as magic
ARG MAGIC_REPO_URL="https://github.com/rtimothyedwards/magic"
ARG MAGIC_REPO_COMMIT="a33d7b78b54d8456769d08236f91f9be31784267"
ARG MAGIC_NAME="magic"
COPY images/magic/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile osic-multitool
#######################################################################
FROM magic as osic-multitool
ARG OSIC_MULTITOOL_REPO_URL="https://github.com/iic-jku/osic-multitool.git"
ARG OSIC_MULTITOOL_REPO_COMMIT="8249723964a376801da3fe49c72fdd2c3ebe81ca"
ARG OSIC_MULTITOOL_NAME="osic-multitool"
COPY images/osic-multitool/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Create open_pdks (part of OpenLane)
#######################################################################
FROM osic-multitool as open_pdks
ARG OPEN_PDKS_REPO_URL="https://github.com/RTimothyEdwards/open_pdks"
ARG OPEN_PDKS_REPO_COMMIT="1341f54f5ce0c4955326297f235e4ace1eb6d419"
ARG OPEN_PDKS_NAME="open_pdks"
COPY images/open_pdks/scripts/install_volare.sh install_volare.sh
RUN bash install_volare.sh
COPY images/open_pdks/scripts/install_ihp.sh install_ihp.sh
RUN bash install_ihp.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"
COPY 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"
COPY 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="54e8665d638393a2e482b237b4ad2b5c02c7ec9a"
ARG FAULT_NAME="fault"
COPY images/fault/scripts/dependencies.sh dependencies.sh
RUN bash dependencies.sh
COPY 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="a4bb956afe84a7792115144f370effe2393228c2"
ARG GAW3_XSCHEM_NAME="gaw3-xschem"
COPY 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"
COPY 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="v3.0.0"
ARG GHDL_NAME="ghdl"
COPY 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="f31b549cfeca6f6c71f029ea0e9f9d46d5663beb"
ARG GTKWAVE_NAME="gtkwave"
COPY 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"
COPY 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="b210eb82645cb99275e9cccad8348e7d18c96b10"
ARG IVERILOG_NAME="iverilog"
COPY images/iverilog/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile klayout (part of OpenLane)
#######################################################################
FROM basepkg as klayout
ARG KLAYOUT_REPO_URL="https://github.com/KLayout/klayout"
ARG KLAYOUT_REPO_COMMIT="44a2aa9ca17c2b1c154f9c410ded063de9ed3e12"
ARG KLAYOUT_NAME="klayout"
COPY 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="28a29504390d53cd3748ff2636be112ef299da0b"
ARG NETGEN_NAME="netgen"
COPY 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-40"
ARG NGSPICE_NAME="ngspice"
COPY images/ngspice/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile ngspyce
#######################################################################
FROM basepkg as ngspyce
ARG NGSPYCE_REPO_URL="https://github.com/ignamv/ngspyce"
ARG NGSPYCE_REPO_COMMIT="154a2724080e3bf15827549bba9f315cd11984fe"
ARG NGSPYCE_NAME="ngspyce"
COPY images/ngspyce/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="r1.9.2"
ARG NVC_NAME="nvc"
COPY images/nvc/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile openlane (part of OpenLane)
#######################################################################
FROM basepkg as openlane
ARG OPENLANE_REPO_URL="https://github.com/The-OpenROAD-Project/OpenLane"
ARG OPENLANE_REPO_COMMIT="2023.05.31"
ARG OPENLANE_NAME="openlane"
COPY 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="9a713f0e8a51769207918da28adfd3c02b854375"
ARG OPENROAD_APP_NAME="openroad"
COPY images/openroad/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"
COPY images/padring/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile pyopus
#######################################################################
FROM basepkg as pyopus
ARG PYOPUS_REPO_URL="https://fides.fe.uni-lj.si/pyopus/download"
ARG PYOPUS_REPO_COMMIT="0.11"
ARG PYOPUS_NAME="pyopus"
COPY images/pyopus/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile qflow helper files
#######################################################################
FROM base as qflow
ARG QFLOW_REPO_URL="https://github.com/RTimothyEdwards/qflow.git"
ARG QFLOW_REPO_COMMIT="b0f76bf4b7dddd59badd67f462e50ed8c9be484c"
ARG QFLOW_NAME="qflow"
COPY images/qflow/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile qucs-s
#######################################################################
FROM base as qucs-s
ARG QUCS_REPO_URL="https://github.com/ra3xdh/qucs_s"
ARG QUCS_REPO_COMMIT="1.0.2"
ARG QUCS_NAME="qucs-s"
COPY images/qucs-s/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="2023.05.31"
ARG RISCV_GNU_TOOLCHAIN_RV32I_NAME="riscv-gnu-toolchain-rv32i"
COPY images/riscv-gnu-toolchain-rv32i/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile verilator (part of OpenLane)
#######################################################################
FROM base as verilator
ARG VERILATOR_REPO_URL="https://github.com/verilator/verilator"
ARG VERILATOR_REPO_COMMIT="947402bc57625106e1387255772fdb5d850a6c65"
ARG VERILATOR_NAME="verilator"
COPY 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="e9c85698001c51db6bdb3625bc353284a3a40002"
ARG XSCHEM_NAME="xschem"
COPY 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.6.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
COPY 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.6.0"
ARG XYCE_XDM_NAME="xyce-xdm"
COPY 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="101075611fc5698739180017bf96b1abf140c8e7"
ARG YOSYS_NAME="yosys"
COPY 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="5b64ccfdeee6c75f70487c1ea153ec3e1fb26cd1"
ARG GHDL_YOSYS_PLUGIN_NAME="ghdl-yosys-plugin"
COPY --from=yosys ${TOOLS} ${TOOLS}
COPY --from=ghdl ${TOOLS} ${TOOLS}
COPY images/ghdl-yosys-plugin/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Compile different components for the rftoolkit
#######################################################################
FROM base as rftoolkit
ARG RFTK_NAME="rftoolkit"
ARG RFTK_FASTHENRY_REPO_URL="https://github.com/ediloren/FastHenry2"
ARG RFTK_FASTHENRY_REPO_COMMIT="363e43ed57ad3b9affa11cba5a86624fad0edaa9"
ARG RFTK_FASTERCAP_REPO_URL="https://github.com/ediloren/FasterCap.git"
ARG RFTK_FASTERCAP_REPO_COMMIT="b42179a8fdd25ab42fe45527282b4a738d7e7f87"
COPY images/rftoolkit/scripts/install.sh install.sh
RUN bash install.sh
#######################################################################
# Final output container
#######################################################################
FROM basepkg 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 \
JUPYTER_PORT=8888
EXPOSE $VNC_PORT $NO_VNC_PORT $JUPYTER_PORT
# Environment config
ENV HOME=/headless \
TERM=xterm \
STARTUPDIR=/dockerstartup \
NO_VNC_HOME=/usr/share/novnc \
VNC_COL_DEPTH=24 \
VNC_RESOLUTION=1680x1050 \
VNC_PW=abc123 \
VNC_VIEW_ONLY=false
# FIXME workaround for OpenMPI throwing errors when run inside a container without Capability "SYS_PTRACE".
ENV OMPI_MCA_btl_vader_single_copy_mechanism=none
# Copy all layers into the final container
COPY --from=open_pdks ${PDK_ROOT}/ ${PDK_ROOT}/
COPY --from=covered ${TOOLS}/ ${TOOLS}/
COPY --from=cvc_rv ${TOOLS}/ ${TOOLS}/
COPY --from=fault ${TOOLS}/ ${TOOLS}/
COPY --from=fault /opt/swift/usr/lib/ /opt/swift/usr/lib/
COPY --from=gaw3-xschem ${TOOLS}/ ${TOOLS}/
COPY --from=gds3d ${TOOLS}/ ${TOOLS}/
COPY --from=gds3d ${PDK_ROOT}/ ${PDK_ROOT}/
COPY --from=ghdl ${TOOLS}/ ${TOOLS}/
COPY --from=gtkwave ${TOOLS}/ ${TOOLS}/
COPY --from=irsim ${TOOLS}/ ${TOOLS}/
COPY --from=iverilog ${TOOLS}/ ${TOOLS}/
COPY --from=klayout ${TOOLS}/ ${TOOLS}/
COPY --from=magic ${TOOLS}/ ${TOOLS}/
COPY --from=netgen ${TOOLS}/ ${TOOLS}/
COPY --from=nvc ${TOOLS}/ ${TOOLS}/
COPY --from=ngspice ${TOOLS}/ ${TOOLS}/
COPY --from=ngspyce ${TOOLS}/ ${TOOLS}/
COPY --from=openlane ${TOOLS}/ ${TOOLS}/
COPY --from=openroad_app ${TOOLS}/ ${TOOLS}/
COPY --from=osic-multitool ${TOOLS}/ ${TOOLS}/
COPY --from=padring ${TOOLS}/ ${TOOLS}/
COPY --from=pyopus ${TOOLS}/ ${TOOLS}/
COPY --from=qflow ${TOOLS}/ ${TOOLS}/
COPY --from=qucs-s ${TOOLS}/ ${TOOLS}/
COPY --from=rftoolkit ${TOOLS}/ ${TOOLS}/
COPY --from=riscv-gnu-toolchain-rv32i ${TOOLS}/ ${TOOLS}/
COPY --from=verilator ${TOOLS}/ ${TOOLS}/
COPY --from=xschem ${TOOLS}/ ${TOOLS}/
COPY --from=xyce ${TOOLS}/ ${TOOLS}/
COPY --from=xyce-xdm ${TOOLS}/ ${TOOLS}/
COPY --from=yosys ${TOOLS}/ ${TOOLS}/
COPY --from=ghdl-yosys-plugin ${TOOLS}_add/ ${TOOLS}/
# Copy skeleton and tool version file for OpenLane
COPY images/iic-osic-tools/skel /
COPY tool_metadata.yml /
# Allow scripts to be executed by any user
RUN find $STARTUPDIR/scripts -name '*.sh' -exec chmod a+x {} +
# Install all APT and PIP packages, as well as noVNC from sources
RUN $STARTUPDIR/scripts/install.sh
# Install examples
RUN git clone https://github.com/iic-jku/SKY130_SAR-ADC1 ${EXAMPLES}/SKY130_SAR-ADC1 && \
git clone https://github.com/iic-jku/SKY130_PLL1.git ${EXAMPLES}/SKY130_PLL1 && \
git clone https://github.com/mabrains/Analog_blocks.git ${EXAMPLES}/SKY130_ANALOG-BLOCKS
# Finalize setup/install
RUN $STARTUPDIR/scripts/post_install.sh
WORKDIR ${DESIGNS}
USER 1000:1000
ENTRYPOINT ["/dockerstartup/scripts/ui_startup.sh"]
CMD ["--wait"]