Skip to content

Commit 3e30f33

Browse files
Merge pull request #436 from puneetmatharu/remove-docker-username-arg
Remove `USERNAME` arg from PyTorch Docker build
2 parents 311a6a8 + fbb90e7 commit 3e30f33

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

ML-Frameworks/pytorch-aarch64/Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ ARG DOCKER_IMAGE_MIRROR=""
1212
# ============================
1313
FROM ${DOCKER_IMAGE_MIRROR}${BASE_IMAGE} AS workshop
1414

15-
ARG USERNAME
1615
ARG TORCH_WHEEL
1716
ARG TORCH_AO_WHEEL
1817

1918
ENV DEBIAN_FRONTEND=noninteractive
20-
ENV DOCKER_USER=${USERNAME}
19+
ENV DOCKER_USER=debian
2120

2221
RUN test "$(arch)" = "aarch64"
2322

@@ -71,9 +70,8 @@ COPY --chown=$DOCKER_USER:$DOCKER_USER pytorch/test /home/$DOCKER_USER/pytorch/t
7170
# ============================
7271
FROM ${DOCKER_IMAGE_MIRROR}${BASE_IMAGE}
7372

74-
ARG USERNAME
7573
ENV DEBIAN_FRONTEND=noninteractive
76-
ENV DOCKER_USER=${USERNAME}
74+
ENV DOCKER_USER=debian
7775

7876
# Runtime OS bits + UI
7977
RUN set -eux && \

ML-Frameworks/pytorch-aarch64/dockerize.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,13 @@ if ! [ -e "$1" ] || ! [ -e "$2" ]; then
2222
exit 1
2323
fi
2424

25-
IMAGE_USERNAME="${USERNAME:-$(. /etc/os-release && echo "$ID")}"
26-
echo "USERNAME=$IMAGE_USERNAME"
27-
2825
docker buildx \
2926
build --load \
3027
-t toolsolutions-pytorch:latest \
3128
--build-context rootdir=../.. \
3229
--build-arg DOCKER_IMAGE_MIRROR \
3330
--build-arg TORCH_WHEEL=$1 \
3431
--build-arg TORCH_AO_WHEEL=$2 \
35-
--build-arg USERNAME="$IMAGE_USERNAME" \
3632
.
3733

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

0 commit comments

Comments
 (0)