diff --git a/Dockerfile b/Dockerfile index 6171982..a8f7083 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,27 +1,26 @@ -FROM ubuntu:latest +FROM ubuntu:22.04 +SHELL ["/bin/bash", "-c"] ENV DEBIAN_FRONTEND=noninteractive -# Non-root user setup ARG USERNAME=root -ARG TESTER_HOME=/root - -RUN apt-get update -y -RUN apt-get upgrade -y -RUN apt-get install -y sudo git vim wget python-is-python3 - -# Setup ORFS under ~ -RUN mkdir -p $TESTER_HOME -WORKDIR $TESTER_HOME -RUN git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts -WORKDIR $TESTER_HOME/OpenROAD-flow-scripts -ENV SUDO_USER=$USERNAME -RUN sudo ./setup.sh -RUN ./build_openroad.sh --local -# test ORFS build -SHELL ["/bin/bash", "-c"] -RUN source ./env.sh && yosys -help && openroad -help && cd flow && make -j $(nproc) +ARG USER_HOME=/root +ARG ORFS_REF=067099e79f308b77cb7f031f37d2f9ca2ac25b7b -# Install bazelisk as bazel -RUN sudo wget https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-amd64 -O /usr/local/bin/bazel -RUN sudo chmod +x /usr/local/bin/bazel +RUN apt-get update -y && \ + apt-get upgrade -y && \ + apt-get install -y sudo git vim wget python-is-python3 && \ + # Setup ORFS under ~ + mkdir -p $USER_HOME && \ + cd $USER_HOME && \ + git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts && \ + cd $USER_HOME/OpenROAD-flow-scripts && \ + git checkout $ORFS_REF && \ + export SUDO_USER=$USERNAME && \ + sudo ./setup.sh && \ + ./build_openroad.sh --local && \ + # test ORFS build + source ./env.sh && yosys -help && openroad -help && cd flow && make -j $(nproc) && \ + # Install bazelisk as bazel + sudo wget https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-amd64 -O /usr/local/bin/bazel && \ + sudo chmod +x /usr/local/bin/bazel -WORKDIR $TESTER_HOME +WORKDIR $USER_HOME