Skip to content

Commit

Permalink
Change the dockerfile back to the way it was
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitri-tenstorrent authored and ttmchiou committed Aug 2, 2024
1 parent 1ea4c4f commit 04ece5a
Showing 1 changed file with 10 additions and 26 deletions.
36 changes: 10 additions & 26 deletions dockerfile/ubuntu-20.04-amd64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,25 @@ FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
ENV DOXYGEN_VERSION=1.9.6

ARG UID=1000
ARG GID=1000

RUN groupadd -g "${GID}" ubuntu \
&& useradd --create-home --no-log-init -u "${UID}" -g "${GID}" ubuntu

USER ubuntu

# Install build and runtime deps
COPY --chown=ubuntu:ubuntu /scripts/docker/requirements.txt /opt/tt_metal_infra/scripts/docker/requirements.txt

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 \
&& sudo rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/*

# Install dev deps
COPY --chown=ubuntu:ubuntu /scripts/docker/requirements_dev.txt /opt/tt_metal_infra/scripts/docker/requirements_dev.txt
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 \
&& sudo rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/*

## Test Related Dependencies
COPY --chown=ubuntu:ubuntu /scripts/docker/install_test_deps.sh /opt/tt_metal_infra/scripts/docker/install_test_deps.sh

RUN mkdir -p /opt/tt_metal_infra/doxygen
RUN 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"
RUN tar -xzf /opt/tt_metal_infra/doxygen/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz -C /opt/tt_metal_infra/doxygen/
RUN rm /opt/tt_metal_infra/doxygen/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
RUN cd /opt/tt_metal_infra/doxygen/doxygen-${DOXYGEN_VERSION}
RUN make install

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 ${DOXYGEN_VERSION}

# Copy remaining convenience scripts
COPY --chown=ubuntu:ubuntu /scripts /opt/tt_metal_infra/scripts
COPY --chown=ubuntu:ubuntu build_metal.sh /scripts/build_metal.sh
COPY /scripts /opt/tt_metal_infra/scripts
COPY build_metal.sh /scripts/build_metal.sh

# Setup Env variables to setup Python Virtualenv - Install TT-Metal Python deps
ENV TT_METAL_INFRA_DIR=/opt/tt_metal_infra
Expand All @@ -49,8 +33,8 @@ ENV PYTHON_ENV_DIR=${TT_METAL_INFRA_DIR}/tt-metal/python_env
# ENV PATH="$PYTHON_ENV_DIR/bin:$PATH"

# Copy requirements from tt-metal folders with requirements.txt docs
COPY --chown=ubuntu:ubuntu /docs/requirements-docs.txt ${TT_METAL_INFRA_DIR}/tt-metal/docs/requirements-docs.txt
COPY --chown=ubuntu:ubuntu /tt_metal/python_env/requirements-dev.txt ${TT_METAL_INFRA_DIR}/tt-metal/tt_metal/python_env/requirements-dev.txt
COPY /docs/requirements-docs.txt ${TT_METAL_INFRA_DIR}/tt-metal/docs/requirements-docs.txt
COPY /tt_metal/python_env/requirements-dev.txt ${TT_METAL_INFRA_DIR}/tt-metal/tt_metal/python_env/requirements-dev.txt

RUN python3 -m pip config set global.extra-index-url https://download.pytorch.org/whl/cpu \
&& python3 -m pip install setuptools wheel
Expand Down

0 comments on commit 04ece5a

Please sign in to comment.