Skip to content

Commit

Permalink
update docker enablement to use new paths
Browse files Browse the repository at this point in the history
  • Loading branch information
gadfort committed Sep 30, 2024
1 parent ec01e87 commit 6b04ce6
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 81 deletions.
6 changes: 4 additions & 2 deletions setup/docker/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
from siliconcompiler import utils

_file_path = os.path.dirname(__file__)
_tools_path = os.path.abspath(os.path.join(_file_path, '..'))
_builder_path = os.path.abspath(os.path.join(_file_path, '..'))
_tools_path = os.path.abspath(
os.path.join(_file_path, '..', '..', 'siliconcompiler', 'toolscripts'))
_install_script_path = os.path.join(_tools_path, 'ubuntu20')
sys.path.append(_tools_path)

Expand Down Expand Up @@ -174,7 +176,7 @@ def make_tool_docker(tool, output_dir, reference_tool=None):
copy_files = []
if docker_extra_files:
for extra_file in docker_extra_files:
copy_files.append(os.path.join(_tools_path, extra_file))
copy_files.append(os.path.join(_builder_path, extra_file))

for f in (os.path.join(_tools_path, '_tools.json'),
os.path.join(_tools_path, '_tools.py'),
Expand Down
4 changes: 2 additions & 2 deletions setup/docker/sc_tools.docker
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ RUN mkdir -p $SC_BUILD
WORKDIR $SC_BUILD

# Copy in support scripts
COPY _tools.py $SC_BUILD
COPY _tools.json $SC_BUILD
COPY _tools.py $SC_BUILD/..
COPY _tools.json $SC_BUILD/..

{% for tool in skip_build %}
COPY install-{{ tool }}.sh $SC_BUILD
Expand Down
4 changes: 2 additions & 2 deletions setup/docker/tool.docker
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ LABEL org.opencontainers.image.source "https://github.com/siliconcompiler/silico
LABEL org.opencontainers.image.description "SiliconCompiler {{ tool }} tool"

# Copy in support files
COPY _tools.py $SC_BUILD
COPY _tools.json $SC_BUILD
COPY _tools.py $SC_BUILD/..
COPY _tools.json $SC_BUILD/..

# Copy and run install script
# The final remove in the same RUN command
Expand Down
6 changes: 3 additions & 3 deletions setup/ubuntu20/Docker.testbuild
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ ENV C_INCLUDE_PATH="$SC_PREFIX/include"
ENV CPLUS_INCLUDE_PATH="$SC_PREFIX/include"

# Copy in support files
COPY _tools.py $SC_BUILD
COPY _tools.json $SC_BUILD
COPY siliconcompiler/toolscripts/_tools.py $SC_BUILD/..
COPY siliconcompiler/toolscripts/_tools.json $SC_BUILD/..

ARG SC_INSTALL_SCRIPT
# Copy and run install script
# The final remove in the same RUN command
# is important to keep the docker image size low
COPY ubuntu20/${SC_INSTALL_SCRIPT} $SC_BUILD
COPY siliconcompiler/toolscripts/ubuntu20/${SC_INSTALL_SCRIPT} $SC_BUILD
WORKDIR $SC_BUILD
RUN apt-get update && \
chmod +x ./${SC_INSTALL_SCRIPT} && \
Expand Down
44 changes: 22 additions & 22 deletions setup/ubuntu20/all.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
#!/usr/bin/env bash

set -e
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-openfpga.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-bambu.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-sv2v.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-yosys.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-netgen.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-chisel.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-montage.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-klayout.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-vpr.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-bluespec.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-magic.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-verible.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-xyce.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-slurm.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-verilator.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-ghdl.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-surelog.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-slang.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-icepack.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-icarus.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-openroad.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-openfpga.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-bambu.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-sv2v.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-yosys.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-netgen.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-chisel.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-montage.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-klayout.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-vpr.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-bluespec.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-magic.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-verible.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-xyce.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-slurm.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-verilator.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-ghdl.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-surelog.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-slang.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-icepack.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-icarus.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-openroad.sh"

# Skip due to yosys dependency
#docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-nextpnr.sh"
#docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-nextpnr.sh"
6 changes: 3 additions & 3 deletions setup/ubuntu22/Docker.testbuild
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ ENV C_INCLUDE_PATH="$SC_PREFIX/include"
ENV CPLUS_INCLUDE_PATH="$SC_PREFIX/include"

# Copy in support files
COPY _tools.py $SC_BUILD
COPY _tools.json $SC_BUILD
COPY siliconcompiler/toolscripts/_tools.py $SC_BUILD/..
COPY siliconcompiler/toolscripts/_tools.json $SC_BUILD/..

ARG SC_INSTALL_SCRIPT
# Copy and run install script
# The final remove in the same RUN command
# is important to keep the docker image size low
COPY ubuntu22/${SC_INSTALL_SCRIPT} $SC_BUILD
COPY siliconcompiler/toolscripts/ubuntu22/${SC_INSTALL_SCRIPT} $SC_BUILD
WORKDIR $SC_BUILD
RUN apt-get update && \
chmod +x ./${SC_INSTALL_SCRIPT} && \
Expand Down
44 changes: 22 additions & 22 deletions setup/ubuntu22/all.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
#!/usr/bin/env bash

set -e
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-openfpga.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-bambu.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-sv2v.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-yosys.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-netgen.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-chisel.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-montage.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-klayout.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-vpr.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-bluespec.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-magic.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-verible.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-xyce.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-slurm.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-verilator.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-ghdl.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-surelog.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-slang.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-icepack.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-icarus.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-openroad.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-openfpga.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-bambu.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-sv2v.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-yosys.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-netgen.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-chisel.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-montage.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-klayout.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-vpr.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-bluespec.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-magic.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-verible.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-xyce.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-slurm.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-verilator.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-ghdl.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-surelog.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-slang.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-icepack.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-icarus.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-openroad.sh"

# Skip due to yosys dependency
#docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-nextpnr.sh"
#docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-nextpnr.sh"
6 changes: 3 additions & 3 deletions setup/ubuntu24/Docker.testbuild
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ ENV C_INCLUDE_PATH="$SC_PREFIX/include"
ENV CPLUS_INCLUDE_PATH="$SC_PREFIX/include"

# Copy in support files
COPY _tools.py $SC_BUILD
COPY _tools.json $SC_BUILD
COPY siliconcompiler/toolscripts/_tools.py $SC_BUILD/..
COPY siliconcompiler/toolscripts/_tools.json $SC_BUILD/..

ARG SC_INSTALL_SCRIPT
# Copy and run install script
# The final remove in the same RUN command
# is important to keep the docker image size low
COPY ubuntu24/${SC_INSTALL_SCRIPT} $SC_BUILD
COPY siliconcompiler/toolscripts/ubuntu24/${SC_INSTALL_SCRIPT} $SC_BUILD
WORKDIR $SC_BUILD
RUN apt-get update && \
chmod +x ./${SC_INSTALL_SCRIPT} && \
Expand Down
44 changes: 22 additions & 22 deletions setup/ubuntu24/all.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
#!/usr/bin/env bash

set -e
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-openfpga.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-bambu.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-sv2v.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-yosys.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-netgen.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-chisel.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-montage.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-klayout.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-vpr.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-bluespec.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-magic.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-verible.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-xyce.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-slurm.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-verilator.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-ghdl.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-surelog.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-slang.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-icepack.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-icarus.sh"
docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-openroad.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-openfpga.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-bambu.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-sv2v.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-yosys.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-netgen.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-chisel.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-montage.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-klayout.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-vpr.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-bluespec.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-magic.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-verible.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-xyce.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-slurm.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-verilator.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-ghdl.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-surelog.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-slang.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-icepack.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-icarus.sh"
docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-openroad.sh"

# Skip due to yosys dependency
#docker build .. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-nextpnr.sh"
#docker build ../.. --file Docker.testbuild --build-arg="SC_INSTALL_SCRIPT=install-nextpnr.sh"

0 comments on commit 6b04ce6

Please sign in to comment.