From cee962b6b248da7a3600c73cb077cc4553a97a88 Mon Sep 17 00:00:00 2001 From: tonyjohnchen Date: Tue, 16 Apr 2024 22:45:18 +0000 Subject: [PATCH] Move apt install from `rto_setup.sh` to `setup.sh` --- maxtext_dependencies.Dockerfile | 7 ++----- rto_setup.sh | 7 ------- setup.sh | 8 +++++++- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/maxtext_dependencies.Dockerfile b/maxtext_dependencies.Dockerfile index fd051070e..8d94ca39c 100644 --- a/maxtext_dependencies.Dockerfile +++ b/maxtext_dependencies.Dockerfile @@ -2,11 +2,8 @@ # Use Python 3.10 as the base image FROM python:3.10-slim-bullseye -# Install system dependencies Git, and numactl -RUN apt-get update && apt-get install -y curl gnupg git numactl - -# Install dependencies for adjusting network rto -RUN apt-get update && apt-get install -y iproute2 ethtool lsof +# Install system dependencies +RUN apt-get update && apt-get install -y curl gnupg # Add the Google Cloud SDK package repository RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list diff --git a/rto_setup.sh b/rto_setup.sh index 742a03f49..723ad29c5 100644 --- a/rto_setup.sh +++ b/rto_setup.sh @@ -5,13 +5,6 @@ set -e echo "Adjust Network settings and apply non cache copy" -# Install ip. -apt-get update -yes | apt-get install net-tools -yes | apt-get install iproute2 -yes | apt-get install procps -yes | apt-get install ethtool - # Disable slow start after idle sysctl net.ipv4.tcp_slow_start_after_idle=0 diff --git a/setup.sh b/setup.sh index 6c1f858e0..0388fac83 100644 --- a/setup.sh +++ b/setup.sh @@ -33,7 +33,13 @@ apt update && \ apt install -y numactl && \ apt install -y lsb-release && \ apt install -y gnupg && \ -apt install -y curl +apt install -y curl && \ +apt install -y net-tools && \ +apt install -y iproute2 && \ +apt install -y procps && \ +apt install -y lsof && \ +apt install -y git && \ +apt install -y ethtool export GCSFUSE_REPO=gcsfuse-`lsb_release -c -s` echo "deb https://packages.cloud.google.com/apt $GCSFUSE_REPO main" | tee /etc/apt/sources.list.d/gcsfuse.list curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -