Skip to content

Commit 2ae5766

Browse files
Copies model dependency to avoid no module errors in CI
- Adds http instead of https in Dockerfile.ird to solve below issue ERROR: failed to build: failed to solve: process "/bin/bash -c apt install libmpfr-dev -y && wget https://ftp.gnu.org/gnu/gdb/gdb-14.2.tar.gz && tar -xvf gdb-14.2.tar.gz && cd gdb-14.2 && ./configure && make -j$(nproc) && make install && cd .. && rm -rf gdb-14.2 gdb-14.2.tar.gz && gdb --version" did not complete successfully: exit code: 4
1 parent 49518fc commit 2ae5766

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.github/Dockerfile.ci

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ RUN mkdir -p $BUILD_DIR && \
1818
ADD . $BUILD_DIR/$PROJECT_NAME
1919

2020

21-
# Install model dependencies as part of the Docker image
22-
WORKDIR $BUILD_DIR/$PROJECT_NAME
23-
RUN chmod +x scripts/install_model_deps.sh
24-
RUN source env/activate && python3 scripts/install_model_deps.sh
2521
# Build the toolchain
2622
WORKDIR $BUILD_DIR/$PROJECT_NAME
2723

@@ -30,8 +26,9 @@ RUN git log -1
3026

3127
# Build the toolchain
3228
WORKDIR $BUILD_DIR/$PROJECT_NAME
33-
RUN source env/activate && \
34-
cmake -B env/build env && \
29+
RUN chmod +x scripts/install_model_deps.sh
30+
RUN source env/activate && python3 scripts/install_model_deps.sh
31+
RUN cmake -B env/build env && \
3532
cmake --build env/build
3633

3734
FROM ghcr.io/tenstorrent/tt-forge-fe/tt-forge-fe-base-ubuntu-22-04:${FROM_TAG} AS ci
@@ -47,5 +44,11 @@ COPY --from=ci-build $TTMLIR_TOOLCHAIN_DIR $TTMLIR_TOOLCHAIN_DIR
4744
RUN echo "Copying from ci-build stage $TTFORGE_TOOLCHAIN_DIR"
4845
COPY --from=ci-build $TTFORGE_TOOLCHAIN_DIR $TTFORGE_TOOLCHAIN_DIR
4946

47+
# Copy the Python environment with model dependencies from the build stage
48+
ARG BUILD_DIR=/home/build
49+
ENV PROJECT_NAME=tt-forge-fe
50+
RUN echo "Copying Python environment with model dependencies"
51+
COPY --from=ci-build $BUILD_DIR/$PROJECT_NAME/env $BUILD_DIR/$PROJECT_NAME/env
52+
5053
RUN du -h --max-depth=2 $TTMLIR_TOOLCHAIN_DIR
5154
RUN du -h --max-depth=2 $TTFORGE_TOOLCHAIN_DIR

.github/Dockerfile.ird

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RUN mkdir -p $TTFORGE_TOOLCHAIN_DIR && \
3131

3232
# Install GDB 14.2
3333
RUN apt install libmpfr-dev -y && \
34-
wget https://ftp.gnu.org/gnu/gdb/gdb-14.2.tar.gz && \
34+
wget http://ftp.gnu.org/gnu/gdb/gdb-14.2.tar.gz && \
3535
tar -xvf gdb-14.2.tar.gz && \
3636
cd gdb-14.2 && \
3737
./configure && \

0 commit comments

Comments
 (0)