Skip to content

Commit 86953d6

Browse files
authored
Merge pull request #376 from puneetmatharu/patch-tensorflow-docker-build
Patch tensorflow docker build
2 parents 35dc446 + 898a8e4 commit 86953d6

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

ML-Frameworks/pytorch-aarch64/dockerize.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# *******************************************************************************
4-
# Copyright 2024 Arm Limited and affiliates.
4+
# Copyright 2025 Arm Limited and affiliates.
55
# SPDX-License-Identifier: Apache-2.0
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");

ML-Frameworks/tensorflow-aarch64/Dockerfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ RUN apt-get install -y protobuf-compiler
4141
RUN apt-get install -y wget
4242

4343
# DOCKER_USER for the Docker user
44-
ENV DOCKER_USER=ubuntu
44+
ENV DOCKER_USER=${USERNAME}
4545

4646
# Setup default user
4747
RUN useradd --create-home -s /bin/bash -m $DOCKER_USER && echo "$DOCKER_USER:Portland" | chpasswd && adduser $DOCKER_USER sudo
@@ -53,7 +53,7 @@ COPY bash_profile /home/$DOCKER_USER/.bash_profile
5353
RUN chown $DOCKER_USER:$DOCKER_USER /home/$DOCKER_USER/.bash_profile
5454

5555
# Add welcome message to warn about dev quality
56-
COPY welcome.txt /home/$DOCKER_USER/.
56+
COPY welcome.txt /home/$DOCKER_USER/
5757
RUN echo '[ ! -z "$TERM" -a -r /home/$DOCKER_USER/welcome.txt ] && cat /home/$DOCKER_USER/welcome.txt' >> /etc/bash.bashrc
5858
RUN echo 'export PATH="$HOME/.local/bin:$PATH"' >> /etc/bash.bashrc
5959

@@ -69,10 +69,8 @@ RUN test -n "$TENSORFLOW_WHEEL"
6969
COPY $TENSORFLOW_WHEEL /home/$DOCKER_USER/
7070

7171
# Install our dev build of TensorFlow.
72-
RUN pip install \
73-
"$(basename "$TENSORFLOW_WHEEL")" \
74-
&& rm \
75-
"$(basename "$TENSORFLOW_WHEEL")"
72+
RUN pip install "$(basename "$TENSORFLOW_WHEEL")" \
73+
&& rm "$(basename "$TENSORFLOW_WHEEL")"
7674

7775
# Base requirements for examples, excluding TensorFlow
7876
COPY requirements.txt ./

ML-Frameworks/tensorflow-aarch64/dockerize.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ docker buildx \
3737
-t toolsolutions-tensorflow:latest \
3838
--build-context rootdir=../.. \
3939
--build-arg TENSORFLOW_WHEEL=$1 \
40+
--build-arg DOCKER_IMAGE_MIRROR \
41+
--build-arg USERNAME=ubuntu \
4042
.
4143

4244
[[ $* == *--build-only* ]] && exit 0

0 commit comments

Comments
 (0)