Skip to content

Commit

Permalink
Dockerfile: simplify and lock ORFS revision
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Czarnecki <[email protected]>
  • Loading branch information
lpawelcz committed Feb 20, 2024
1 parent e8e1d2b commit 4fc7bd7
Showing 1 changed file with 22 additions and 23 deletions.
45 changes: 22 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4fc7bd7

Please sign in to comment.