File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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");
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ RUN apt-get install -y protobuf-compiler
4141RUN 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
4747RUN 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
5353RUN 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/
5757RUN echo '[ ! -z "$TERM" -a -r /home/$DOCKER_USER/welcome.txt ] && cat /home/$DOCKER_USER/welcome.txt' >> /etc/bash.bashrc
5858RUN echo 'export PATH="$HOME/.local/bin:$PATH"' >> /etc/bash.bashrc
5959
@@ -69,10 +69,8 @@ RUN test -n "$TENSORFLOW_WHEEL"
6969COPY $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
7876COPY requirements.txt ./
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments