-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#7944 add dockerfile and installation steps #7949
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Second stage: the actual image | ||
FROM ubuntu:20.04 | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
ENV GTEST_VERSION=1.13.0 | ||
ENV DOXYGEN_VERSION=1.9.6 | ||
|
||
# Install build and runtime deps | ||
COPY /scripts/docker/requirements.txt /opt/tt_metal_infra/scripts/docker/requirements.txt | ||
RUN apt-get -y update \ | ||
&& xargs -a /opt/tt_metal_infra/scripts/docker/requirements.txt apt-get install -y --no-install-recommends \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install dev deps | ||
COPY /scripts/docker/requirements_dev.txt /opt/tt_metal_infra/scripts/docker/requirements_dev.txt | ||
RUN apt-get -y update \ | ||
&& xargs -a /opt/tt_metal_infra/scripts/docker/requirements_dev.txt apt-get install -y --no-install-recommends \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
## Test Related Dependencies | ||
COPY /scripts/docker/install_test_deps.sh /opt/tt_metal_infra/scripts/docker/install_test_deps.sh | ||
RUN /bin/bash /opt/tt_metal_infra/scripts/docker/install_test_deps.sh ${GTEST_VERSION} ${DOXYGEN_VERSION} | ||
|
||
# Copy remaining convenience scripts | ||
COPY /scripts /opt/tt_metal_infra/scripts | ||
COPY build_metal.sh /scripts/build_metal.sh | ||
|
||
# ENV TT_METAL_INFRA_DIR=/opt/tt_metal_infra | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we delete this extra commented stuff? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will be for future work in including Virtual Env in Docker. This will be integrated but just disabled for future reference |
||
# ENV PYTHON_ENV_DIR=${TT_METAL_INFRA_DIR}/tt-metal/python_env | ||
# RUN python3 -m venv $PYTHON_ENV_DIR | ||
|
||
# COPY /docs/requirements-docs.txt ${TT_METAL_INFRA_DIR}/tt-metal/docs/. | ||
# COPY /tt_metal/python_env/* ${TT_METAL_INFRA_DIR}/tt-metal/tt_metal/python_env/. | ||
# ENV PATH="$PYTHON_ENV_DIR/bin:$PATH" | ||
# RUN python3 -m pip config set global.extra-index-url https://download.pytorch.org/whl/cpu \ | ||
# && python3 -m pip install setuptools wheel | ||
|
||
# RUN python3 -m pip install -r ${TT_METAL_INFRA_DIR}/tt-metal/tt_metal/python_env/requirements-dev.txt | ||
|
||
CMD ["tail", "-f", "/dev/null"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# Check if two arguments are provided | ||
if [ "$#" -ne 2 ]; then | ||
echo "Usage: $0 <gtest_version> <doxygen_version>" | ||
exit 1 | ||
fi | ||
|
||
GTEST_VERSION=$1 | ||
DOXYGEN_VERSION=$2 | ||
|
||
# Installs Google test | ||
mkdir -p /opt/tt_metal_infra/googletest | ||
chmod ugo+w /opt/tt_metal_infra/googletest | ||
wget -O /opt/tt_metal_infra/googletest/googletest-release-${GTEST_VERSION}.tar.gz https://github.com/google/googletest/archive/refs/tags/v${GTEST_VERSION}.tar.gz | ||
tar -xzf /opt/tt_metal_infra/googletest/googletest-release-${GTEST_VERSION}.tar.gz -C /opt/tt_metal_infra/googletest/ | ||
cd /opt/tt_metal_infra/googletest/googletest-${GTEST_VERSION} | ||
cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON . | ||
make | ||
make install | ||
|
||
# Install doxygen | ||
mkdir -p /opt/tt_metal_infra/doxygen | ||
wget -O /opt/tt_metal_infra/doxygen/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz "https://www.doxygen.nl/files/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz" | ||
tar -xzf /opt/tt_metal_infra/doxygen/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz -C /opt/tt_metal_infra/doxygen/ | ||
rm /opt/tt_metal_infra/doxygen/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz | ||
cd /opt/tt_metal_infra/doxygen/doxygen-${DOXYGEN_VERSION} | ||
make install |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apt-utils | ||
dialog | ||
software-properties-common=0.99.9.12 | ||
build-essential=12.8ubuntu1.1 | ||
libgoogle-glog-dev=0.4.0-1build1 | ||
libyaml-cpp-dev=0.6.2-4ubuntu1 | ||
git | ||
git-lfs | ||
clang-6.0=1:6.0.1-14 | ||
libboost-all-dev=1.71.0.0ubuntu2 | ||
libsndfile1=1.0.28-7ubuntu0.2 | ||
pandoc | ||
libtbb-dev | ||
libcapstone-dev | ||
pkg-config | ||
cmake=3.16.3-1ubuntu1.20.04.1 | ||
curl | ||
wget | ||
python3-pip | ||
libhwloc-dev | ||
|
||
libhdf5-serial-dev | ||
ruby=1:2.7+1 | ||
python3.8-venv=3.8.10-0ubuntu1~20.04.9 | ||
|
||
cargo | ||
ninja-build |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
sudo | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Damn Also, can we add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added vim to requirements There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now I know why vim was in my docker container LOL! |
||
nano | ||
acl | ||
jq | ||
openssh-server | ||
vim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why delete this cache? IS it for something later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keeps the docker layer smaller.