Skip to content

Commit b4f86eb

Browse files
committed
update
1 parent 72a6ba3 commit b4f86eb

File tree

2 files changed

+27
-21
lines changed

2 files changed

+27
-21
lines changed

.github/workflows/build-tutorials.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ jobs:
1313
matrix:
1414
include:
1515
- { shard: 1, num_shards: 2, runner: "linux.g5.4xlarge.nvidia.gpu" }
16+
- { shard: 2, num_shards: 2, runner: "linux.g5.4xlarge.nvidia.gpu" }
1617
runs-on: ${{ matrix.runner }}
1718
env:
18-
DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-cuda11.7-cudnn8-py3-gcc7"
19+
DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-cuda12.1-cudnn8-py3-gcc9"
1920
CUDA_VERSION: "9"
2021
steps:
2122
- name: Setup SSH (Click me for login details)
@@ -30,7 +31,7 @@ jobs:
3031
uses: actions/checkout@v3
3132

3233
- name: Setup Linux
33-
uses: pytorch/pytorch/.github/actions/setup-linux@master
34+
uses: pytorch/pytorch/.github/actions/setup-linux@main
3435

3536
- name: Install nvidia driver, nvidia-docker runtime, set GPU_FLAG
3637
uses: pytorch/test-infra/.github/actions/setup-nvidia@main
@@ -82,7 +83,7 @@ jobs:
8283
docker exec -t "${container_name}" sh -c ".jenkins/worker.sh"
8384
8485
85-
- name: Upload Python Docs Preview
86+
- name: Upload artifacts
8687
uses: seemethere/upload-artifact-s3@v5
8788
with:
8889
retention-days: 14
@@ -103,7 +104,7 @@ jobs:
103104
needs: pytorch_tutorial_build_worker
104105
runs-on: [self-hosted, linux.2xlarge]
105106
env:
106-
DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-cuda11.7-cudnn8-py3-gcc7"
107+
DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-cuda12.1-cudnn8-py3-gcc9"
107108
CUDA_VERSION: "9"
108109
steps:
109110
- name: Setup SSH (Click me for login details)
@@ -118,7 +119,7 @@ jobs:
118119
uses: actions/checkout@v3
119120

120121
- name: Setup Linux
121-
uses: pytorch/pytorch/.github/actions/setup-linux@master
122+
uses: pytorch/pytorch/.github/actions/setup-linux@main
122123

123124
- name: Install nvidia driver, nvidia-docker runtime, set GPU_FLAG
124125
uses: pytorch/test-infra/.github/actions/setup-nvidia@main
@@ -144,13 +145,19 @@ jobs:
144145
shell: bash
145146
env:
146147
DOCKER_IMAGE: ${{ steps.docker-image.outputs.docker-image }}
148+
BUCKET_NAME: "pytorch-tutorial-build-pull-request"
149+
COMMIT_ID: temp/${{ github.event.pull_request.number }}
150+
COMMIT_SOURCE: ${{ github.ref }}
147151
run: |
148152
set -ex
149153
150154
chmod +x ".jenkins/manager.sh"
151155
152156
container_name=$(docker run \
153157
${GPU_FLAG:-} \
158+
-e BUCKET_NAME \
159+
-e COMMIT_ID \
160+
-e COMMIT_SOURCE \
154161
--env-file="/tmp/github_env_${GITHUB_RUN_ID}" \
155162
--tty \
156163
--detach \
@@ -165,7 +172,6 @@ jobs:
165172
166173
docker exec -t "${container_name}" sh -c ".jenkins/worker.sh"
167174
168-
169175
- name: Upload Python Docs Preview
170176
uses: seemethere/upload-artifact-s3@v5
171177
with:

.jenkins/manager.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@ python .jenkins/validate_tutorials_built.py
3232
awsv2 s3 cp manager.7z s3://${BUCKET_NAME}/${COMMIT_ID}/manager.7z --acl public-read
3333

3434
# Step 7: push new HTML files and static files to gh-pages
35-
if [[ "$COMMIT_SOURCE" == master || "$COMMIT_SOURCE" == main ]]; then
36-
git clone https://github.com/pytorch/tutorials.git -b gh-pages gh-pages
37-
cp -r docs/* gh-pages/
38-
pushd gh-pages
39-
# DANGER! DO NOT REMOVE THE `set +x` SETTING HERE!
40-
set +x
41-
git remote set-url origin https://${GITHUB_PYTORCHBOT_USERNAME}:${GITHUB_PYTORCHBOT_TOKEN}@github.com/pytorch/tutorials.git
42-
set -x
43-
git add -f -A || true
44-
git config user.email "soumith+bot@pytorch.org"
45-
git config user.name "pytorchbot"
46-
git commit -m "Automated tutorials push" || true
47-
git status
48-
git push origin gh-pages
49-
fi
35+
# if [[ "$COMMIT_SOURCE" == master || "$COMMIT_SOURCE" == main ]]; then
36+
# git clone https://github.com/pytorch/tutorials.git -b gh-pages gh-pages
37+
# cp -r docs/* gh-pages/
38+
# pushd gh-pages
39+
# # DANGER! DO NOT REMOVE THE `set +x` SETTING HERE!
40+
# set +x
41+
# git remote set-url origin https://${GITHUB_PYTORCHBOT_USERNAME}:${GITHUB_PYTORCHBOT_TOKEN}@github.com/pytorch/tutorials.git
42+
# set -x
43+
# git add -f -A || true
44+
# git config user.email "soumith+bot@pytorch.org"
45+
# git config user.name "pytorchbot"
46+
# git commit -m "Automated tutorials push" || true
47+
# git status
48+
# git push origin gh-pages
49+
# fi

0 commit comments

Comments
 (0)