Skip to content

Commit

Permalink
Remove Nvida
Browse files Browse the repository at this point in the history
  • Loading branch information
vmilosevic committed Sep 10, 2024
1 parent d62124a commit cd3cfa1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
18 changes: 14 additions & 4 deletions .github/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ FROM ghcr.io/tenstorrent/tt-mlir/tt-mlir-base-ubuntu-22-04:${FROM_TAG} AS ci-bui
SHELL ["/bin/bash", "-c"]

# Create a directory for the build and toolchain
ARG GIT_SHA
ENV PROJECT_NAME=tt-mlir
ENV BUILD_DIR=/home/build
ENV TTMLIR_TOOLCHAIN_DIR=/opt/ttmlir-toolchain

RUN echo "Building $PROJECT_NAME at $GIT_SHA"

RUN mkdir -p $BUILD_DIR && \
mkdir -p $TTMLIR_TOOLCHAIN_DIR

ARG GIT_SHA

# Clone the project and update submodules
RUN git clone https://github.com/tenstorrent/$PROJECT_NAME.git $BUILD_DIR/$PROJECT_NAME && \
cd $BUILD_DIR/$PROJECT_NAME && \
Expand All @@ -24,6 +26,9 @@ RUN source env/activate && \
cmake -B env/build env && \
cmake --build env/build

# Remove Nvida from toolchain
RUN rm -fr /opt/ttmlir-toolchain/venv/lib/python3.10/site-packages/nvidia

# Self-test

# Build project to test the container
Expand Down Expand Up @@ -52,6 +57,11 @@ RUN source env/activate && \
RUN source env/activate && \
cmake --build build -- check-ttmlir

# Final stage
FROM ghcr.io/tenstorrent/tt-mlir/tt-mlir-base-ubuntu-22-04:${FROM_TAG} AS ci

# Copy the TTMLIR_TOOLCHAIN_DIR from the previous stage
FROM ghcr.io/tenstorrent/tt-mlir/tt-mlir-base-ubuntu-22-04:${FROM_TAG}
COPY --from=ci-build $TTMLIR_TOOLCHAIN_DIR $TTMLIR_TOOLCHAIN_DIR
ENV TTMLIR_TOOLCHAIN_DIR=/opt/ttmlir-toolchain
RUN echo "Copying from ci-build stage $TTMLIR_TOOLCHAIN_DIR"
COPY --from=ci-build $TTMLIR_TOOLCHAIN_DIR $TTMLIR_TOOLCHAIN_DIR
RUN echo "Toolcahin size:\ndu -h --max-depth=1 $TTMLIR_TOOLCHAIN_DIR"
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build and Test
on:
workflow_dispatch:
workflow_call:
push:
# push:

jobs:
build-ttmlir:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build and Publish Docker Image
on:
workflow_dispatch:
workflow_call:
# push:
push:

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build in Docker
on:
workflow_dispatch:
workflow_call:
push:
# push:

jobs:

Expand Down

0 comments on commit cd3cfa1

Please sign in to comment.