Skip to content

Commit

Permalink
test larger runner, verbose upgrade and original install sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
KevDevSha committed May 18, 2024
1 parent 04d9024 commit 0f728ae
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-configure-build-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ on:
required: true
jobs:
configure-build-push:
runs-on: mosaic-4wide
runs-on: mosaic-8wide
steps:

- name: Checkout
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
with:
context: ${{ inputs.context }}
tags: ${{ env.IMAGE_TAG }}
platforms: linux/amd64,linux/arm64
platforms: linux/arm64
target: ${{ inputs.target }}
push: ${{ inputs.push }}
cache-from: type=registry,ref=${{ env.IMAGE_CACHE }}
Expand Down
34 changes: 20 additions & 14 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ ARG COMPOSER_INSTALL_COMMAND='mosaicml[all]'

FROM ${BASE_IMAGE} AS pytorch_stage

WORKDIR /composer_${TARGETARCH}

ARG DEBIAN_FRONTEND=noninteractive

ARG LINUX_DISTRO='ubuntu'
Expand All @@ -82,6 +80,7 @@ SHELL ["/bin/bash", "-c"]

ARG CUDA_VERSION


# Remove a bad symlink from the base composer image
# If this file is present after the first command, kaniko
# won't be able to build the docker image.
Expand All @@ -95,22 +94,29 @@ RUN if [ -n "$CUDA_VERSION" ]; then \
LINUX_DISTRO_VERSION="${LINUX_DISTRO_VERSION//./}" && \
rm -f /etc/apt/sources.list.d/cuda.list && \
rm -f /etc/apt/sources.list.d/nvidia-ml.list && \
apt-get update && \
mkdir -p /tmp/cuda-keyring && \
if [ "$TARGETARCH" = "amd64" ]; then \
apt-get install -y --no-install-recommends wget && \
wget -P /tmp/cuda-keyring https://developer.download.nvidia.com/compute/cuda/repos/${LINUX_DISTRO}${LINUX_DISTRO_VERSION}/x86_64/cuda-keyring_1.0-1_all.deb; \
apt-get update && \
apt-get install -y --no-install-recommends wget && \
apt-get autoclean && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* \
apt-key del 7fa2af80 && \
mkdir -p /tmp/cuda-keyring && \
wget -P /tmp/cuda-keyring https://developer.download.nvidia.com/compute/cuda/repos/${LINUX_DISTRO}${LINUX_DISTRO_VERSION}/x86_64/cuda-keyring_1.0-1_all.deb; \
dpkg -i /tmp/cuda-keyring/cuda-keyring_1.0-1_all.deb && \
rm -rf /tmp/cuda-keyring ; \
else \
apt-get install -y gnupg gnupg1 gnupg2 && \
apt-get install -y --no-install-recommends wget && \
wget -P /tmp/cuda-keyring https://developer.download.nvidia.com/compute/cuda/repos/${LINUX_DISTRO}${LINUX_DISTRO_VERSION}/arm64/cuda-keyring_1.0-1_all.deb; \
fi && \
apt-get install -y gnupg gnupg1 gnupg2 && \
apt-get install -y --no-install-recommends wget && \
apt-get autoclean && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/lib/apt/lists/* \
apt-key del 7fa2af80 && \
mkdir -p /tmp/cuda-keyring && \
wget -P /tmp/cuda-keyring https://developer.download.nvidia.com/compute/cuda/repos/${LINUX_DISTRO}${LINUX_DISTRO_VERSION}/arm64/cuda-keyring_1.0-1_all.deb; \
dpkg -i /tmp/cuda-keyring/cuda-keyring_1.0-1_all.deb && \
rm -rf /tmp/cuda-keyring; \
rm -rf /tmp/cuda-keyring ; \
fi ; \
fi


Expand Down Expand Up @@ -362,8 +368,8 @@ RUN useradd -rm -d /home/mosaicml -s /bin/bash -u 1000 -U -s /bin/bash mosaicml
#########################
# Upgrade apt packages
#########################
RUN apt-get update && \
apt-get upgrade -y && \
RUN apt-get update -v && \
apt-get upgrade -y -v && \
apt-get autoclean && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
Expand Down

0 comments on commit 0f728ae

Please sign in to comment.