ARG RELEASE |
ARG LAUNCHPAD_BUILD_ARCH |
LABEL org.opencontainers.image.ref.name=ubuntu |
LABEL org.opencontainers.image.version=22.04 |
ADD file:a5d32dc2ab15ff0d7dbd72af26e361eb1f3e87a0d29ec3a1ceab24ad7b3e6ba9 in / |
CMD ["/bin/bash"] |
SHELL [/bin/bash -c] |
RUN /bin/bash -c mkdir toolsrc # buildkit |
RUN /bin/bash -c apt-get update --fix-missing; DEBIAN_FRONTEND=noninteractive apt-get -y install wget make gcc g++ gfortran make cmake autoconf automake git libhwloc15 libopenmpi-dev openmpi-bin openmpi-common python3 pip bison libgtk-3-dev libcanberra-gtk3-module gtkwave tcsh m4 csh libx11-dev tcl-dev tk-dev libcairo2-dev mesa-common-dev libglu1-mesa-dev libncurses-dev libedit-dev zlib1g-dev m4 git gcc g++ make libboost-all-dev graphviz sudo vim flex libfl-dev libfftw3-dev libsuitesparse-dev libblas-dev liblapack-dev libtool; apt-get update --fix-missing # buildkit |
WORKDIR /toolsrc |
COPY /toolsrc/OpenROAD-flow-scripts/etc/DependencyInstaller.sh /toolsrc/etc/DependencyInstaller.sh # buildkit |
COPY /toolsrc/OpenROAD-flow-scripts/tools/OpenROAD/etc/DependencyInstaller.sh /toolsrc/tools/OpenROAD/etc/DependencyInstaller.sh # buildkit |
RUN /bin/bash -c ./etc/DependencyInstaller.sh -base # buildkit |
RUN /bin/bash -c ./tools/OpenROAD/etc/DependencyInstaller.sh -base # buildkit |
COPY /opt/* /opt # buildkit |
WORKDIR /toolsrc |
COPY /toolsrc/hwloc-2.8.0 /toolsrc/hwloc-2.8.0 # buildkit |
WORKDIR /toolsrc/hwloc-2.8.0 |
RUN /bin/bash -c make install # buildkit |
RUN /bin/bash -c rm -rf /toolsrc # buildkit |
WORKDIR / |
ADD home template # buildkit |
RUN /bin/bash -c mkdir "/host" # buildkit |
WORKDIR /host |
RUN /bin/bash -c rm -rf /opt/cad/conf # buildkit |
RUN /bin/bash -c mkdir /opt/cad/conf # buildkit |
ENV USER=bcli |
ENV USER_ID=1000 |
ENV GROUP_ID=1000 |
ENV MEMBERS= |
RUN /bin/bash -c echo "version: 17" # buildkit |
CMD ["/bin/bash" "-c" "exec /bin/bash -c \"echo \\\"127.0.0.1 bcli-$USER\\\" >> /etc/hosts; echo \\\"$MEMBERS\\\" | sed 's/[0-9]* \\\\(adm\\|cdrom\\|sudo\\|dip\\|plugdev\\|lxd\\|docker\\|dialout\\|sambashare\\|lpadmin\\\\) \\?//g' | sed 's/ /\\n/g' | xargs -n 2 /usr/sbin/groupadd -g; /usr/sbin/useradd -u $USER_ID -g $USER $USER; echo \\\"$MEMBERS\\\" | sed 's/[0-9]* \\\\(adm\\|cdrom\\|sudo\\|dip\\|plugdev\\|lxd\\|docker\\|dialout\\|sambashare\\\\) \\?//g' | sed 's/ [0-9]\\+ /,/g' | sed 's/[0-9]\\+ //g' | xargs -I{} /usr/sbin/usermod -aG {} $USER; cp -r /template /home/$USER; chown -R $USER:$USER /home/$USER; echo \\\"$USER ALL=NOPASSWD: /usr/bin/apt-get install *\\\" > /etc/sudoers.d/apt-get; echo \\\"$USER ALL=NOPASSWD: /usr/bin/apt install *\\\" > /etc/sudoers.d/apt; ln -s /host/.ssh /home/$USER/.ssh; awk '/\\[user\\]/,/\\[[^u]/' /host/.gitconfig | head -n -1 > /home/$USER/gitconfig; cat /home/$USER/.gitconfig >> /home/$USER/gitconfig; mv /home/$USER/gitconfig /home/$USER/.gitconfig; trap : TERM INT; sleep infinity & wait\""] |