Skip to content

Commit

Permalink
add sudo setup back
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Sep 2, 2024
1 parent 4ac5f8b commit 52c1000
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ resources:
containers:
- container: linux-artifact-builder
image: lightgbm/vsts-agent:manylinux_2_28_x86_64
options: "--name ci-container -v /usr/bin/docker:/tmp/docker:ro"
mountReadOnly:
work: false
externals: true
Expand Down Expand Up @@ -65,17 +64,17 @@ jobs:
echo "---- docker images ----"
/tmp/docker images
}
# check disk usage
print-diagnostics
# remove old containers, container images, volumes
# ref: https://stackoverflow.com/a/32723127/3986677)
/tmp/docker system prune \
--all \
--force \
--filter until=720h
# check again
# check disk usage again
print-diagnostics
displayName: clean
###########################################
- job: Linux
###########################################
Expand Down Expand Up @@ -192,10 +191,10 @@ jobs:
echo "##vso[task.prependpath]$CONDA/bin"
displayName: 'Set variables'
# https://github.com/microsoft/azure-pipelines-agent/issues/2043#issuecomment-687983301
# - script: |
# /tmp/docker exec -t -u 0 ci-container \
# sh -c "apt-get update && apt-get -o Dpkg::Options::="--force-confold" -y install sudo"
# displayName: 'Install sudo'
- script: |
/tmp/docker exec -t -u 0 ci-container \
sh -c "apt-get update && apt-get -o Dpkg::Options::="--force-confold" -y install sudo"
displayName: 'Install sudo'
- script: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends git
Expand Down

0 comments on commit 52c1000

Please sign in to comment.