diff --git a/sky/clouds/service_catalog/images/aws_utils/image_gen.py b/sky/clouds/service_catalog/images/aws_utils/image_gen.py index cadfee912a9..970988997d2 100644 --- a/sky/clouds/service_catalog/images/aws_utils/image_gen.py +++ b/sky/clouds/service_catalog/images/aws_utils/image_gen.py @@ -78,7 +78,7 @@ def copy_image_and_make_public(target_region): copy_command = ( f"aws ec2 copy-image --source-region {args.region} " f"--source-image-id {args.image_id} --region {target_region} " - f"--name 'skypilot-aws-{args.processor}-{args.os_type}-{time.time()}' --output json" + f"--name 'skypilot-aws-{args.processor}-{args.os_type}-{time.strftime('%y%m%d')}' --output json" ) print(copy_command) result = subprocess.run(copy_command, diff --git a/sky/clouds/service_catalog/images/provisioners/skypilot.sh b/sky/clouds/service_catalog/images/provisioners/skypilot.sh index cecb3664736..3bdb6dd0635 100644 --- a/sky/clouds/service_catalog/images/provisioners/skypilot.sh +++ b/sky/clouds/service_catalog/images/provisioners/skypilot.sh @@ -4,12 +4,17 @@ sudo systemctl stop unattended-upgrades || true sudo systemctl disable unattended-upgrades || true sudo sed -i 's/Unattended-Upgrade "1"/Unattended-Upgrade "0"/g' /etc/apt/apt.conf.d/20auto-upgrades || true +sudo systemctl stop apt-daily.timer apt-daily-upgrade.timer unattended-upgrades.service +sudo systemctl disable apt-daily.timer apt-daily-upgrade.timer unattended-upgrades.service +sudo systemctl mask apt-daily.service apt-daily-upgrade.service unattended-upgrades.service +sudo systemctl daemon-reload # Configure dpkg sudo dpkg --configure --force-overwrite -a # Apt-get installs sudo apt-get install jq -y +sudo apt install retry # Create necessary directories mkdir -p ~/sky_workdir diff --git a/sky/templates/aws-ray.yml.j2 b/sky/templates/aws-ray.yml.j2 index 269c4acc505..95751ab1849 100644 --- a/sky/templates/aws-ray.yml.j2 +++ b/sky/templates/aws-ray.yml.j2 @@ -122,6 +122,10 @@ available_node_types: - path: /etc/apt/apt.conf.d/10cloudinit-disable content: | APT::Periodic::Enable "0"; + - path: /etc/apt/apt.conf.d/52unattended-upgrades-local + content: | + Unattended-Upgrade::DevRelease "false"; + Unattended-Upgrade::Allowed-Origins {}; bootcmd: - systemctl stop apt-daily.timer apt-daily-upgrade.timer unattended-upgrades.service - systemctl disable apt-daily.timer apt-daily-upgrade.timer unattended-upgrades.service