Skip to content

Commit 7271f68

Browse files
committed
Applied PR reviews
1 parent 4b52d41 commit 7271f68

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

Dockerfile

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,29 @@
11
FROM ubuntu:20.04
2+
ARG DEBIAN_FRONTEND=noninteractive
23
# set out workspace
34
ENV WORKSPACE=/workspace
45
RUN mkdir -p ${WORKSPACE}
5-
VOLUME ${WORKSPACE}
66
WORKDIR ${WORKSPACE}
7-
# Set environment variables
8-
ARG GIT_SSL_NO_VERIFY=1
9-
ARG DEBIAN_FRONTEND=noninteractive
7+
COPY . ${WORKSPACE}
108
# Install and cleanup is done in one command to minimize the build cache size
119
RUN apt-get update -qq \
12-
&& apt-get -y install --no-install-recommends \
10+
# Extract package names from install_apt_packages.sh
11+
&& sed '/sudo/d' install_apt_packages.sh | sed '/#/d' | sed 's/ \\//g' | sed '/^$/d' | sed '/^[[:space:]]*$/d' \
12+
# Install packages
13+
| xargs apt-get -y install --no-install-recommends \
1314
# Additional packages not listed in install_apt_packages.sh
15+
&& apt-get -y install --no-install-recommends \
1416
wget \
15-
git \
1617
ninja-build \
1718
libeigen3-dev \
1819
libtbb-dev \
1920
python3-pip \
20-
# Clone VTR repo
21-
&& git clone https://github.com/verilog-to-routing/vtr-verilog-to-routing.git . \
22-
# Extract package names from install_apt_packages.sh
23-
&& sed '/sudo/d' install_apt_packages.sh | sed '/#/d' | sed 's/ \\//g' | sed '/^$/d' | sed '/^[[:space:]]*$/d' \
24-
# Install packages
25-
| xargs apt-get -y install --no-install-recommends \
21+
# Install python packages
22+
&& pip install -r requirements.txt \
2623
# Cleanup
2724
&& apt-get autoclean && apt-get clean && apt-get -y autoremove \
2825
&& rm -rf /var/lib/apt/lists/*
29-
# Install python packages
30-
RUN pip install -r requirements.txt
3126
# Build VTR
32-
RUN make \
33-
&& make install
27+
RUN make && make install
3428
# Container's default launch command
35-
CMD [ "/bin/bash" ]
29+
SHELL ["/bin/bash", "-c"]

0 commit comments

Comments
 (0)