-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 528f2c6
Showing
7 changed files
with
307 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
./package/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
FROM ubuntu:14.04 AS installer | ||
ARG repo_sed=s#://archive.ubuntu.com#://kr.archive.ubuntu.com#g | ||
|
||
# Java 6+ might be required to run the installer | ||
RUN sed -i -e '${repo_sed}' /etc/apt/sources.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends openjdk-6-jre \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# information of the tool to be installed in this image | ||
# TODO how to deduplicate below arguments declaration | ||
ARG base_dir=/usr/cadence | ||
ARG tool=INCISIVE | ||
ARG version=15 | ||
|
||
ARG installer_dir=InstallScape | ||
|
||
|
||
# copy installer and installation package temporarily | ||
COPY package/${installer_dir} /tmp/installer/ | ||
COPY package/${tool}${version} /tmp/package/ | ||
|
||
# batch install target package | ||
RUN mkdir -p ${base_dir}/ \ | ||
&& /tmp/installer/iscape/bin/iscape.sh -batch majorAction=InstallFromArchive \ | ||
archiveDirectory=/tmp/package/ installDirectory=${base_dir}/${tool}${version} \ | ||
&& rm -rf /tmp/package/ \ | ||
&& rm -rf /tmp/installer/ | ||
|
||
|
||
# NOTE using multi-stage image build; avoid installer package from included in the final image | ||
FROM ubuntu:14.04 | ||
ARG repo_sed=s#://archive.ubuntu.com#://kr.archive.ubuntu.com#g | ||
|
||
# Java 6+ might be required to run actual software | ||
RUN sed -i -e '${repo_sed}' /etc/apt/sources.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends openjdk-6-jre \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# install required library to run Cadence tool and X11 library to show GUI | ||
RUN sed -i -e '${repo_sed}' /etc/apt/sources.list \ | ||
&& dpkg --add-architecture i386 \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
libxtst6:i386 libxext6:i386 libxi6:i386 ksh csh \ | ||
&& apt-get install -y --no-install-recommends xorg \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
# TODO find much lighter package rather than xorg; 'x11-apps' is not applicable | ||
|
||
# copy actual tool to be run in this image | ||
ARG base_dir=/usr/cadence | ||
ARG tool=INCISIVE | ||
ARG version=15 | ||
|
||
ARG default_command=nclaunch # or irun | ||
|
||
# just copy installed package from intermediate image | ||
COPY --from=installer ${base_dir}/ ${base_dir}/ | ||
|
||
# set path to the tool executable | ||
ENV PATH ${base_dir}/${tool}${version}/tools/bin:$PATH | ||
|
||
# let 64-bit binary to be executed | ||
ENV CDS_AUTO_64BIT "ALL" | ||
|
||
|
||
# set path to the tool executable | ||
CMD "${default_command}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
FROM ubuntu:14.04 AS installer | ||
ARG repo_sed=s#://archive.ubuntu.com#://kr.archive.ubuntu.com#g | ||
|
||
# 'cshell' is required to run the installer | ||
RUN sed -i -e '${repo_sed}' /etc/apt/sources.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends csh \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# information of the tool to be installed in this image | ||
# TODO how to deduplicate below arguments declaration | ||
ARG base_dir=/usr/synopsys | ||
ARG tool=syn | ||
ARG version=L-2016.03-SP5-5 | ||
|
||
ARG installer_version=v3.2 | ||
|
||
|
||
# copy installer and installation package temporarily | ||
COPY package/installer_${installer_version} /tmp/installer/ | ||
COPY package/${tool}_v${version} /tmp/package/ | ||
|
||
# batch install target package | ||
RUN mkdir -p ${base_dir} \ | ||
&& /tmp/installer/SynopsysInstaller_${installer_version}.run -dir ${base_dir}/installer_${installer_version} \ | ||
&& echo 'yes' | USER=docker ${base_dir}/installer_${installer_version}/batch_installer -install_as_root -source /tmp/package/ -target ${base_dir}/ -allprods \ | ||
&& rm -rf /tmp/package/ \ | ||
&& rm -rf /tmp/installer/ \ | ||
&& rm -rf ${base_dir}/installer_${installer_version} | ||
|
||
|
||
# NOTE using multi-stage image build; avoid installer package from included in the final image | ||
FROM ubuntu:14.04 | ||
ARG repo_sed=s#://archive.ubuntu.com#://kr.archive.ubuntu.com#g | ||
|
||
# install required library to run Synopsys tool and X11 library to show GUI | ||
RUN sed -i -e '${repo_sed}' /etc/apt/sources.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
csh libxss1 libsm6 libice6 libxft2 libjpeg62 libtiff5 libmng2 libpng12-0 \ | ||
&& apt-get install -y --no-install-recommends xorg \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
# TODO find much lighter package rather than xorg; 'x11-apps' is not applicable | ||
|
||
# WORKAROUND link outdated library filename required from Synopsys tools | ||
# WORKAROUND set default shell as Bash to avoid error from script included in the tool | ||
RUN ln -s /usr/lib/x86_64-linux-gnu/libtiff.so.5 /usr/lib/x86_64-linux-gnu/libtiff.so.3 \ | ||
&& ln -s /usr/lib/x86_64-linux-gnu/libmng.so.2 /usr/lib/x86_64-linux-gnu/libmng.so.1 \ | ||
&& update-alternatives --install /bin/sh sh /bin/bash 20 | ||
|
||
# copy actual tool to be run in this image | ||
ARG base_dir=/usr/synopsys | ||
ARG tool=syn | ||
ARG version=L-2016.03-SP5-5 | ||
|
||
|
||
# just copy installed package from intermediate image | ||
COPY --from=installer ${base_dir}/ ${base_dir}/ | ||
|
||
# set path to the tool executable | ||
ENV PATH ${base_dir}/${tool}/${version}/bin:$PATH | ||
|
||
# default command when running this image | ||
CMD "dc_shell" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
FROM ubuntu:14.04 AS installer | ||
ARG repo_sed=s#://archive.ubuntu.com#://kr.archive.ubuntu.com#g | ||
|
||
# 'cshell' is required to run the installer | ||
RUN sed -i -e '${repo_sed}' /etc/apt/sources.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends csh \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# information of the tool to be installed in this image | ||
# TODO how to deduplicate below arguments declaration | ||
ARG base_dir=/usr/synopsys | ||
ARG tool=icc | ||
ARG version=L-2016.03-SP5-2 | ||
|
||
ARG installer_version=v3.2 | ||
|
||
|
||
# copy installer and installation package temporarily | ||
COPY package/installer_${installer_version} /tmp/installer/ | ||
COPY package/${tool}_v${version} /tmp/package/ | ||
|
||
# batch install target package | ||
RUN mkdir -p ${base_dir} \ | ||
&& /tmp/installer/SynopsysInstaller_${installer_version}.run -dir ${base_dir}/installer_${installer_version} \ | ||
&& echo 'yes' | USER=docker ${base_dir}/installer_${installer_version}/batch_installer -install_as_root -source /tmp/package/ -target ${base_dir}/ -allprods \ | ||
&& rm -rf /tmp/package/ \ | ||
&& rm -rf /tmp/installer/ \ | ||
&& rm -rf ${base_dir}/installer_${installer_version} | ||
|
||
|
||
# NOTE using multi-stage image build; avoid installer package from included in the final image | ||
FROM ubuntu:14.04 | ||
ARG repo_sed=s#://archive.ubuntu.com#://kr.archive.ubuntu.com#g | ||
|
||
# install required library to run Synopsys tool and X11 library to show GUI | ||
RUN sed -i -e '${repo_sed}' /etc/apt/sources.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
csh libxss1 libsm6 libice6 libxft2 libjpeg62 libtiff5 libmng2 libpng12-0 \ | ||
&& apt-get install -y --no-install-recommends xorg \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
# TODO find much lighter package rather than xorg; 'x11-apps' is not applicable | ||
|
||
# WORKAROUND link outdated library filename required from Synopsys tools | ||
# WORKAROUND set default shell as Bash to avoid error from script included in the tool | ||
RUN ln -s /usr/lib/x86_64-linux-gnu/libtiff.so.5 /usr/lib/x86_64-linux-gnu/libtiff.so.3 \ | ||
&& ln -s /usr/lib/x86_64-linux-gnu/libmng.so.2 /usr/lib/x86_64-linux-gnu/libmng.so.1 \ | ||
&& update-alternatives --install /bin/sh sh /bin/bash 20 | ||
|
||
# copy actual tool to be run in this image | ||
ARG base_dir=/usr/synopsys | ||
ARG tool=icc | ||
ARG version=L-2016.03-SP5-2 | ||
|
||
ARG default_command=icc_shell | ||
|
||
|
||
# just copy installed package from intermediate image | ||
COPY --from=installer ${base_dir}/ ${base_dir}/ | ||
|
||
# set path to the tool executable | ||
ENV PATH ${base_dir}/${tool}/${version}/bin:$PATH | ||
|
||
# default command when running this image | ||
CMD "${default_command}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# [WIP] Dockerize scripts for commercial EDA tools | ||
|
||
I don't think dockerizing EDA tools is somewhat useful, but here is the `Dockerfile`s for dockerizing popular EDA tools! | ||
|
||
## CAVEAT | ||
- I failed to achieve X11 forwarding. In other words, with this image you cannot open GUI windows. | ||
- Using Ubuntu (14.04) as a base image, the size of generated images is larger than desired. | ||
- Did not test uploading to "private" docker registry. | ||
- (you should not upload image containing commeiclal tool to public docker registry, of course ;-) ) | ||
- Intermediate image does not removed automatically. You have to remove by yourself for now. | ||
|
||
## Prerequisites | ||
- Docker 17.05+ (this script utilizes multi-stage build feature) | ||
- Installer and installation package of the tool you want to dockerize | ||
- This repository consists of just `Dockerfile`s, not actual images or installer packages | ||
|
||
## Generating an image | ||
|
||
- First, clone this repository to your workstation. | ||
- Copy (or bind mount) installer and installation package to the subdirectory | ||
- Refer to shell scripts for bind-mounting installation files from other path | ||
- Execute below command to create an image. | ||
`$ sudo docker build -t <image_name>:<version> -f <Dockerfile> .` | ||
`e.g. $ sudo docker build -t synopsys_dc:X-2020.4 -f Dockerfile_Synopsys_DC .` | ||
- Remove intermediate image created during building an image. | ||
```bash | ||
$ sudo docker images # find a tag of the intermediate image | ||
$ sudo docker rmi <image_tag_you_want_to_remove> | ||
``` | ||
|
||
- Example container launching command | ||
- You should pass environment variable regarding your license server | ||
```bash | ||
$ sudo docker run --rm -it -e LM_LICENSE_FILE="<port>@<license_server>" \ | ||
-env="DISPLAY" \ | ||
<image_name> [<command>] | ||
``` | ||
|
||
## Vendor specific regardings | ||
|
||
### Synopsys | ||
|
||
- Requires following jobs to be run within Ubuntu (14.04) environment | ||
```bash | ||
$ sudo apt install csh libxss1 libsm6 libice6 libxft2 libjpeg62 libtiff5 libmng2 libpng12-0 | ||
# WORKAROUND link old library filenames with newer version | ||
$ sudo ln -s /usr/lib/x86_64-linux-gnu/libtiff.so.5 /usr/lib/x86_64-linux-gnu/libtiff.so.3 | ||
$ sudo ln -s /usr/lib/x86_64-linux-gnu/libmng.so.2 /usr/lib/x86_64-linux-gnu/libmng.so.1 | ||
``` | ||
|
||
### Cadence | ||
|
||
- Requires following packages | ||
```bash | ||
$ sudo apt install openjdk-6-jre # for installer | ||
$ sudo dpkg --add-architecture i386 | ||
$ sudo apt libxtst6:i386 libxext6:i386 libxi6:i386 ksh csh \ | ||
``` | ||
|
||
- define below envvar to execute 64-bit binary | ||
`$ export CDS_AUTO_64BIT=ALL` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
# NOTE define below envvars for specific tool and its vendor! | ||
|
||
## example for Synopsys | ||
INSTALLER_DIR=installer_v3.2 | ||
|
||
TOOL_NAME=syn | ||
TOOL_VER=vL-2016.03-SP5-5 | ||
# NOTICE for first 'v' in tool version string | ||
## end of for Synopsys | ||
|
||
## or for Cadence | ||
#INSTALLER_DIR=InstallScape | ||
# | ||
#TOOL_NAME=INCISIVE | ||
#TOOL_VER=15 | ||
## end of for Cadence | ||
|
||
PACKAGE_ROOT=/export/installer/ | ||
|
||
|
||
# create mount point for installer / actual tool package directory | ||
mkdir -p package/${INSTALLER_DIR} | ||
mkdir -p package/${TOOL_NAME}_${TOOL_VER} | ||
|
||
# WORKAROUND use bind mount to get installer without copying files | ||
sudo mount --bind ${PACKAGE_ROOT}/${INSTALLER_DIR} package/${INSTALLER_DIR} | ||
sudo mount --bind ${PACKAGE_ROOT}/${TOOL_NAME}_${TOOL_VER} package/${TOOL_NAME}_${TOOL_VER} | ||
|
||
# after creating images, be sure to unmount above directories! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
for d in $(ls package) | ||
do | ||
echo package/$d; | ||
sudo umount package/$d; | ||
rmdir package/$d; | ||
done | ||
|
||
rmdir package | ||
|