From 25df9e68b26b556de71bddec15abae08a42ed5fe Mon Sep 17 00:00:00 2001 From: udai Date: Wed, 10 Jul 2024 17:02:00 +0000 Subject: [PATCH 01/19] testing fork branch --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 33956318fc..f41f6a6d0f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ❗ANNOUNCEMENT: Security Changes❗ +# ❗ANNOUNCEMENT: Security Changes test❗ TorchServe now enforces token authorization enabled and model API control disabled by default. These security features are intended to address the concern of unauthorized API calls and to prevent potential malicious code from being introduced to the model server. Refer the following documentation for more information: [Token Authorization](https://github.com/pytorch/serve/blob/master/docs/token_authorization_api.md), [Model API control](https://github.com/pytorch/serve/blob/master/docs/model_api_control.md) # TorchServe From d3d776007e59650ba2f8ec7fc0f8d3d4d76dd089 Mon Sep 17 00:00:00 2001 From: udai Date: Wed, 10 Jul 2024 17:11:14 +0000 Subject: [PATCH 02/19] adding git fetch --- .github/workflows/docker-ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker-ci.yaml b/.github/workflows/docker-ci.yaml index 0e7db91825..df5d7b944b 100644 --- a/.github/workflows/docker-ci.yaml +++ b/.github/workflows/docker-ci.yaml @@ -27,6 +27,7 @@ jobs: - name: Determine the branch name id: branch-name run: | + git fetch --all if [[ "${GITHUB_REF}" == refs/heads/* ]]; then GITHUB_BRANCH=${GITHUB_REF#refs/heads/} elif [[ "${GITHUB_REF}" == refs/pull/*/merge ]]; then From dedbf0c5b2dc06a5d13fdc98a56826a4d003f685 Mon Sep 17 00:00:00 2001 From: udai Date: Wed, 10 Jul 2024 17:27:51 +0000 Subject: [PATCH 03/19] adding git fetch --- .github/workflows/docker-ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-ci.yaml b/.github/workflows/docker-ci.yaml index df5d7b944b..42a3e81dc0 100644 --- a/.github/workflows/docker-ci.yaml +++ b/.github/workflows/docker-ci.yaml @@ -19,6 +19,8 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive + repository: ${{ github.event.pull_request.head.repo.full_name }} + fetch-depth: 0 - name: Test build_image.sh script with custom tagging and gpu flag working-directory: docker From 9581013974ec99fdbb10642855f868eb50bd6319 Mon Sep 17 00:00:00 2001 From: udaij12 <32673964+udaij12@users.noreply.github.com> Date: Fri, 12 Jul 2024 16:08:12 -0700 Subject: [PATCH 04/19] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f41f6a6d0f..33956318fc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ❗ANNOUNCEMENT: Security Changes test❗ +# ❗ANNOUNCEMENT: Security Changes❗ TorchServe now enforces token authorization enabled and model API control disabled by default. These security features are intended to address the concern of unauthorized API calls and to prevent potential malicious code from being introduced to the model server. Refer the following documentation for more information: [Token Authorization](https://github.com/pytorch/serve/blob/master/docs/token_authorization_api.md), [Model API control](https://github.com/pytorch/serve/blob/master/docs/model_api_control.md) # TorchServe From 7d89c652c5db8f5a48a2b87ffce4917440089446 Mon Sep 17 00:00:00 2001 From: udai Date: Fri, 12 Jul 2024 23:26:06 +0000 Subject: [PATCH 05/19] adding test prints --- .github/workflows/docker-ci.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/docker-ci.yaml b/.github/workflows/docker-ci.yaml index 42a3e81dc0..13eddc27eb 100644 --- a/.github/workflows/docker-ci.yaml +++ b/.github/workflows/docker-ci.yaml @@ -26,6 +26,12 @@ jobs: working-directory: docker run: ./test_build_image_tagging.sh ${{ matrix.python-version }} + - name: Test prints + run: | + echo "test 1: ${{ github.event.pull_request.head.repo.full_name }}" + echo "test 2: ${{ github.event.pull_request.head.repo.owner.login }}" + echo "test 3: ${{ github.event.pull_request.head.repo.owner.login }}" + - name: Determine the branch name id: branch-name run: | From 4953b1e0ef0d0a2e495299f3cad5491c141e4a79 Mon Sep 17 00:00:00 2001 From: udai Date: Fri, 12 Jul 2024 23:28:22 +0000 Subject: [PATCH 06/19] adding test prints --- .github/workflows/docker-ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-ci.yaml b/.github/workflows/docker-ci.yaml index 13eddc27eb..83581c2a26 100644 --- a/.github/workflows/docker-ci.yaml +++ b/.github/workflows/docker-ci.yaml @@ -28,9 +28,9 @@ jobs: - name: Test prints run: | - echo "test 1: ${{ github.event.pull_request.head.repo.full_name }}" - echo "test 2: ${{ github.event.pull_request.head.repo.owner.login }}" - echo "test 3: ${{ github.event.pull_request.head.repo.owner.login }}" + echo "test 1: ${{ github.event.pull_request.head.repo.full_name }}" + echo "test 2: ${{ github.event.pull_request.head.repo.owner.login }}" + echo "test 3: ${{ github.event.pull_request.head.repo.owner.login }}" - name: Determine the branch name id: branch-name From b988b1385c75d50c5547381e44986d69344865d8 Mon Sep 17 00:00:00 2001 From: udai Date: Fri, 12 Jul 2024 23:35:58 +0000 Subject: [PATCH 07/19] adding test prints --- .github/workflows/docker-ci.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-ci.yaml b/.github/workflows/docker-ci.yaml index 83581c2a26..f623162ff9 100644 --- a/.github/workflows/docker-ci.yaml +++ b/.github/workflows/docker-ci.yaml @@ -22,14 +22,14 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} fetch-depth: 0 - - name: Test build_image.sh script with custom tagging and gpu flag - working-directory: docker - run: ./test_build_image_tagging.sh ${{ matrix.python-version }} + # - name: Test build_image.sh script with custom tagging and gpu flag + # working-directory: docker + # run: ./test_build_image_tagging.sh ${{ matrix.python-version }} - name: Test prints run: | echo "test 1: ${{ github.event.pull_request.head.repo.full_name }}" - echo "test 2: ${{ github.event.pull_request.head.repo.owner.login }}" + echo "test 2: ${{ github.event.pull_request.base.repo.full_name }}" echo "test 3: ${{ github.event.pull_request.head.repo.owner.login }}" - name: Determine the branch name From 4d00aa6266af322827f434de333a2930acbb2081 Mon Sep 17 00:00:00 2001 From: udai Date: Tue, 16 Jul 2024 01:30:21 +0000 Subject: [PATCH 08/19] testing changes --- .github/workflows/docker-ci.yaml | 16 +++++++++++----- docker/Dockerfile | 10 ++++++++-- docker/build_image.sh | 22 ++++++++++++++++++---- 3 files changed, 37 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker-ci.yaml b/.github/workflows/docker-ci.yaml index f623162ff9..3cd4329106 100644 --- a/.github/workflows/docker-ci.yaml +++ b/.github/workflows/docker-ci.yaml @@ -26,11 +26,13 @@ jobs: # working-directory: docker # run: ./test_build_image_tagging.sh ${{ matrix.python-version }} - - name: Test prints + - name: Check if fork run: | - echo "test 1: ${{ github.event.pull_request.head.repo.full_name }}" - echo "test 2: ${{ github.event.pull_request.base.repo.full_name }}" - echo "test 3: ${{ github.event.pull_request.head.repo.owner.login }}" + CURR_HEAD = ${{ github.event.pull_request.head.repo.full_name }} + BASE_HEAD = ${{ github.event.pull_request.base.repo.full_name }} + if [ "$CURR_HEAD" != "$BASE_HEAD" ]; then + echo "FORK=$CURR_HEAD" >> $GITHUB_ENV + fi - name: Determine the branch name id: branch-name @@ -48,7 +50,11 @@ jobs: working-directory: docker run: | IMAGE_TAG=test-image-${{ matrix.python-version }} - ./build_image.sh -py "${{ matrix.python-version }}" -t "${IMAGE_TAG}" -b ${{ steps.branch-name.outputs.GITHUB_BRANCH }} -s + if [[ env.FORK_OWNER == '' ]]; + ./build_image.sh -py "${{ matrix.python-version }}" -t "${IMAGE_TAG}" -b ${{ steps.branch-name.outputs.GITHUB_BRANCH }} -s + else + ./build_image.sh -py "${{ matrix.python-version }}" -t "${IMAGE_TAG}" -b ${{ steps.branch-name.outputs.GITHUB_BRANCH }} -s -f env.FORK_OWNER + fi echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_OUTPUT - name: Container Healthcheck diff --git a/docker/Dockerfile b/docker/Dockerfile index 31fad49970..d3d1727fee 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -34,6 +34,7 @@ ARG BUILD_NIGHTLY ARG BUILD_FROM_SRC ARG LOCAL_CHANGES ARG BRANCH_NAME +ARG FORK_NAME ENV PYTHONUNBUFFERED TRUE RUN --mount=type=cache,id=apt-dev,target=/var/cache/apt \ @@ -71,8 +72,13 @@ COPY ./ serve RUN \ if echo "$LOCAL_CHANGES" | grep -q "false"; then \ - rm -rf serve;\ - git clone --recursive https://github.com/pytorch/serve.git -b $BRANCH_NAME; \ + if + rm -rf serve;\ + git clone --recursive https://github.com/pytorch/$FORK_NAME -b BRANCH_NAME; \ + else + rm -rf serve;\ + git clone --recursive https://github.com/pytorch/serve.git -b $BRANCH_NAME; \ + fi fi diff --git a/docker/build_image.sh b/docker/build_image.sh index 4738021a8a..42e44bacd9 100755 --- a/docker/build_image.sh +++ b/docker/build_image.sh @@ -4,6 +4,7 @@ set -o errexit -o nounset -o pipefail MACHINE=cpu BRANCH_NAME="master" +FORK_NAME="" DOCKER_TAG="pytorch/torchserve:latest-cpu" BUILD_TYPE="production" BASE_IMAGE="ubuntu:20.04" @@ -37,6 +38,7 @@ do echo "-n, --nightly specify to build with TorchServe nightly" echo "-s, --source specify to build with TorchServe from source" echo "-r, --remote specify to use local TorchServe" + echo "-f, --fork specify a fork to use" exit 0 ;; -b|--branch_name) @@ -110,6 +112,18 @@ do LOCAL_CHANGES=false shift ;; + -f|--fork) + if test $ + then + FORK_NAME="$2" + LOCAL_CHANGES=false + shift + else + echo "Error! fork_name not provided" + exit 1 + fi + shift + ;; # With default ubuntu version 20.04 -cv|--cudaversion) CUDA_VERSION="$2" @@ -202,15 +216,15 @@ fi if [ "${BUILD_TYPE}" == "production" ] then - DOCKER_BUILDKIT=1 docker build --file Dockerfile --build-arg BASE_IMAGE="${BASE_IMAGE}" --build-arg USE_CUDA_VERSION="${CUDA_VERSION}" --build-arg PYTHON_VERSION="${PYTHON_VERSION}" --build-arg BUILD_NIGHTLY="${BUILD_NIGHTLY}" --build-arg BRANCH_NAME="${BRANCH_NAME}" --build-arg BUILD_FROM_SRC="${BUILD_FROM_SRC}" --build-arg LOCAL_CHANGES="${LOCAL_CHANGES}" -t "${DOCKER_TAG}" --target production-image ../ + DOCKER_BUILDKIT=1 docker build --file Dockerfile --build-arg BASE_IMAGE="${BASE_IMAGE}" --build-arg USE_CUDA_VERSION="${CUDA_VERSION}" --build-arg PYTHON_VERSION="${PYTHON_VERSION}" --build-arg BUILD_NIGHTLY="${BUILD_NIGHTLY}" --build-arg BRANCH_NAME="${BRANCH_NAME}" --build-arg BUILD_FROM_SRC="${BUILD_FROM_SRC}" --build-arg LOCAL_CHANGES="${LOCAL_CHANGES}" --build-arg FORK_NAME="${FORK_NAME}" -t "${DOCKER_TAG}" --target production-image ../ elif [ "${BUILD_TYPE}" == "ci" ] then - DOCKER_BUILDKIT=1 docker build --file Dockerfile --build-arg BASE_IMAGE="${BASE_IMAGE}" --build-arg USE_CUDA_VERSION="${CUDA_VERSION}" --build-arg PYTHON_VERSION="${PYTHON_VERSION}" --build-arg BUILD_NIGHTLY="${BUILD_NIGHTLY}" --build-arg BRANCH_NAME="${BRANCH_NAME}" --build-arg BUILD_FROM_SRC="${BUILD_FROM_SRC}" --build-arg LOCAL_CHANGES="${LOCAL_CHANGES}" -t "${DOCKER_TAG}" --target ci-image ../ + DOCKER_BUILDKIT=1 docker build --file Dockerfile --build-arg BASE_IMAGE="${BASE_IMAGE}" --build-arg USE_CUDA_VERSION="${CUDA_VERSION}" --build-arg PYTHON_VERSION="${PYTHON_VERSION}" --build-arg BUILD_NIGHTLY="${BUILD_NIGHTLY}" --build-arg BRANCH_NAME="${BRANCH_NAME}" --build-arg BUILD_FROM_SRC="${BUILD_FROM_SRC}" --build-arg LOCAL_CHANGES="${LOCAL_CHANGES}" --build-arg FORK_NAME="${FORK_NAME}" -t "${DOCKER_TAG}" --target ci-image ../ else if [ "${BUILD_CPP}" == "true" ] then - DOCKER_BUILDKIT=1 docker build --file Dockerfile.cpp --build-arg BASE_IMAGE="${BASE_IMAGE}" --build-arg USE_CUDA_VERSION="${CUDA_VERSION}" --build-arg PYTHON_VERSION="${PYTHON_VERSION}" --build-arg BRANCH_NAME="${BRANCH_NAME}" -t "${DOCKER_TAG}" --target cpp-dev-image . + DOCKER_BUILDKIT=1 docker build --file Dockerfile.cpp --build-arg BASE_IMAGE="${BASE_IMAGE}" --build-arg USE_CUDA_VERSION="${CUDA_VERSION}" --build-arg PYTHON_VERSION="${PYTHON_VERSION}" --build-arg BRANCH_NAME="${BRANCH_NAME}" --build-arg FORK_NAME="${FORK_NAME}" -t "${DOCKER_TAG}" --target cpp-dev-image . else - DOCKER_BUILDKIT=1 docker build --file Dockerfile --build-arg BASE_IMAGE="${BASE_IMAGE}" --build-arg USE_CUDA_VERSION="${CUDA_VERSION}" --build-arg PYTHON_VERSION="${PYTHON_VERSION}" --build-arg BUILD_NIGHTLY="${BUILD_NIGHTLY}" --build-arg BRANCH_NAME="${BRANCH_NAME}" --build-arg BUILD_FROM_SRC="${BUILD_FROM_SRC}" --build-arg LOCAL_CHANGES="${LOCAL_CHANGES}" --build-arg BUILD_WITH_IPEX="${BUILD_WITH_IPEX}" -t "${DOCKER_TAG}" --target dev-image ../ + DOCKER_BUILDKIT=1 docker build --file Dockerfile --build-arg BASE_IMAGE="${BASE_IMAGE}" --build-arg USE_CUDA_VERSION="${CUDA_VERSION}" --build-arg PYTHON_VERSION="${PYTHON_VERSION}" --build-arg BUILD_NIGHTLY="${BUILD_NIGHTLY}" --build-arg BRANCH_NAME="${BRANCH_NAME}" --build-arg BUILD_FROM_SRC="${BUILD_FROM_SRC}" --build-arg LOCAL_CHANGES="${LOCAL_CHANGES}" --build-arg BUILD_WITH_IPEX="${BUILD_WITH_IPEX}" --build-arg FORK_NAME="${FORK_NAME}" -t "${DOCKER_TAG}" --target dev-image ../ fi fi From 2fe13b777046ef85a7f94f6a96cd6db12eb33af8 Mon Sep 17 00:00:00 2001 From: udai Date: Tue, 16 Jul 2024 01:33:29 +0000 Subject: [PATCH 09/19] testing changes --- .github/workflows/docker-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-ci.yaml b/.github/workflows/docker-ci.yaml index 3cd4329106..814d086e89 100644 --- a/.github/workflows/docker-ci.yaml +++ b/.github/workflows/docker-ci.yaml @@ -30,7 +30,7 @@ jobs: run: | CURR_HEAD = ${{ github.event.pull_request.head.repo.full_name }} BASE_HEAD = ${{ github.event.pull_request.base.repo.full_name }} - if [ "$CURR_HEAD" != "$BASE_HEAD" ]; then + if [ "${CURR_HEAD}" != "${BASE_HEAD}" ]; then echo "FORK=$CURR_HEAD" >> $GITHUB_ENV fi From 908672e70d575373e05d563d25ee07688e186d32 Mon Sep 17 00:00:00 2001 From: udai Date: Tue, 16 Jul 2024 01:34:06 +0000 Subject: [PATCH 10/19] adding checks back --- .github/workflows/docker-ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-ci.yaml b/.github/workflows/docker-ci.yaml index 814d086e89..3f216b45bc 100644 --- a/.github/workflows/docker-ci.yaml +++ b/.github/workflows/docker-ci.yaml @@ -22,9 +22,9 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} fetch-depth: 0 - # - name: Test build_image.sh script with custom tagging and gpu flag - # working-directory: docker - # run: ./test_build_image_tagging.sh ${{ matrix.python-version }} + - name: Test build_image.sh script with custom tagging and gpu flag + working-directory: docker + run: ./test_build_image_tagging.sh ${{ matrix.python-version }} - name: Check if fork run: | From 9096ef7d578b574cbb39f8799e1bbf30342445ea Mon Sep 17 00:00:00 2001 From: udai Date: Tue, 16 Jul 2024 01:34:42 +0000 Subject: [PATCH 11/19] small fix --- .github/workflows/docker-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-ci.yaml b/.github/workflows/docker-ci.yaml index 3f216b45bc..026073ebae 100644 --- a/.github/workflows/docker-ci.yaml +++ b/.github/workflows/docker-ci.yaml @@ -31,7 +31,7 @@ jobs: CURR_HEAD = ${{ github.event.pull_request.head.repo.full_name }} BASE_HEAD = ${{ github.event.pull_request.base.repo.full_name }} if [ "${CURR_HEAD}" != "${BASE_HEAD}" ]; then - echo "FORK=$CURR_HEAD" >> $GITHUB_ENV + echo "FORK=${CURR_HEAD}" >> $GITHUB_ENV fi - name: Determine the branch name From 1a12fd067e93dd540169af977a677cafe8fc12ea Mon Sep 17 00:00:00 2001 From: udai Date: Tue, 16 Jul 2024 01:42:34 +0000 Subject: [PATCH 12/19] testing fix --- .github/workflows/docker-ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-ci.yaml b/.github/workflows/docker-ci.yaml index 026073ebae..df449c6a43 100644 --- a/.github/workflows/docker-ci.yaml +++ b/.github/workflows/docker-ci.yaml @@ -28,8 +28,8 @@ jobs: - name: Check if fork run: | - CURR_HEAD = ${{ github.event.pull_request.head.repo.full_name }} - BASE_HEAD = ${{ github.event.pull_request.base.repo.full_name }} + CURR_HEAD=${{ github.event.pull_request.head.repo.full_name }} + BASE_HEAD=${{ github.event.pull_request.base.repo.full_name }} if [ "${CURR_HEAD}" != "${BASE_HEAD}" ]; then echo "FORK=${CURR_HEAD}" >> $GITHUB_ENV fi From 269f660218e3567c59994589b90581b862d2ec2b Mon Sep 17 00:00:00 2001 From: udai Date: Tue, 16 Jul 2024 01:51:18 +0000 Subject: [PATCH 13/19] fixing dockerfile --- docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index d3d1727fee..1ebec69ec2 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -72,10 +72,10 @@ COPY ./ serve RUN \ if echo "$LOCAL_CHANGES" | grep -q "false"; then \ - if + if [ -n "$FORK_NAME" ]; then rm -rf serve;\ git clone --recursive https://github.com/pytorch/$FORK_NAME -b BRANCH_NAME; \ - else + else \ rm -rf serve;\ git clone --recursive https://github.com/pytorch/serve.git -b $BRANCH_NAME; \ fi From 349729af97996acc424619f09a9a5c91d0cb0451 Mon Sep 17 00:00:00 2001 From: udai Date: Tue, 16 Jul 2024 02:08:30 +0000 Subject: [PATCH 14/19] fixing dockerfile --- docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 1ebec69ec2..01f37550ee 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -72,8 +72,8 @@ COPY ./ serve RUN \ if echo "$LOCAL_CHANGES" | grep -q "false"; then \ - if [ -n "$FORK_NAME" ]; then - rm -rf serve;\ + if [ -n "$FORK_NAME" ]; then \ + rm -rf serve; \ git clone --recursive https://github.com/pytorch/$FORK_NAME -b BRANCH_NAME; \ else \ rm -rf serve;\ From 2fc8b86dea04dc7ad289c64cebe7d4021c9e1666 Mon Sep 17 00:00:00 2001 From: udai Date: Tue, 16 Jul 2024 02:24:17 +0000 Subject: [PATCH 15/19] fixing dockerfile --- docker/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 01f37550ee..3dcc32d578 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -74,11 +74,11 @@ RUN \ if echo "$LOCAL_CHANGES" | grep -q "false"; then \ if [ -n "$FORK_NAME" ]; then \ rm -rf serve; \ - git clone --recursive https://github.com/pytorch/$FORK_NAME -b BRANCH_NAME; \ + git clone --recursive https://github.com/pytorch/$FORK_NAME -b $BRANCH_NAME; \ else \ - rm -rf serve;\ + rm -rf serve; \ git clone --recursive https://github.com/pytorch/serve.git -b $BRANCH_NAME; \ - fi + fi \ fi From 6c0bd38ce0915be8261268eaaa2027514d4c0733 Mon Sep 17 00:00:00 2001 From: udai Date: Tue, 16 Jul 2024 02:32:04 +0000 Subject: [PATCH 16/19] fixing docker ci --- .github/workflows/docker-ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-ci.yaml b/.github/workflows/docker-ci.yaml index df449c6a43..6ec7c512f3 100644 --- a/.github/workflows/docker-ci.yaml +++ b/.github/workflows/docker-ci.yaml @@ -50,10 +50,10 @@ jobs: working-directory: docker run: | IMAGE_TAG=test-image-${{ matrix.python-version }} - if [[ env.FORK_OWNER == '' ]]; - ./build_image.sh -py "${{ matrix.python-version }}" -t "${IMAGE_TAG}" -b ${{ steps.branch-name.outputs.GITHUB_BRANCH }} -s + if [[ -z "${{ env.FORK_OWNER }}" ]]; then + ./build_image.sh -py "${{ matrix.python-version }}" -t "${IMAGE_TAG}" -b "${{ steps.branch-name.outputs.GITHUB_BRANCH }}" -s else - ./build_image.sh -py "${{ matrix.python-version }}" -t "${IMAGE_TAG}" -b ${{ steps.branch-name.outputs.GITHUB_BRANCH }} -s -f env.FORK_OWNER + ./build_image.sh -py "${{ matrix.python-version }}" -t "${IMAGE_TAG}" -b "${{ steps.branch-name.outputs.GITHUB_BRANCH }}" -s -f "${{ env.FORK_OWNER }}" fi echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_OUTPUT From a9050e2a11a9928bf78528077a7bdd5fde44bd3b Mon Sep 17 00:00:00 2001 From: udai Date: Tue, 16 Jul 2024 17:08:26 +0000 Subject: [PATCH 17/19] fixing fork var --- .github/workflows/docker-ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-ci.yaml b/.github/workflows/docker-ci.yaml index 6ec7c512f3..229d29a928 100644 --- a/.github/workflows/docker-ci.yaml +++ b/.github/workflows/docker-ci.yaml @@ -50,10 +50,10 @@ jobs: working-directory: docker run: | IMAGE_TAG=test-image-${{ matrix.python-version }} - if [[ -z "${{ env.FORK_OWNER }}" ]]; then + if [[ -z "${{ env.FORK }}" ]]; then ./build_image.sh -py "${{ matrix.python-version }}" -t "${IMAGE_TAG}" -b "${{ steps.branch-name.outputs.GITHUB_BRANCH }}" -s else - ./build_image.sh -py "${{ matrix.python-version }}" -t "${IMAGE_TAG}" -b "${{ steps.branch-name.outputs.GITHUB_BRANCH }}" -s -f "${{ env.FORK_OWNER }}" + ./build_image.sh -py "${{ matrix.python-version }}" -t "${IMAGE_TAG}" -b "${{ steps.branch-name.outputs.GITHUB_BRANCH }}" -s -f "${{ env.FORK }}" fi echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_OUTPUT From 67b971003c5f9edebdc42d90c0902c31d83d3fae Mon Sep 17 00:00:00 2001 From: udai Date: Tue, 23 Jul 2024 18:44:12 +0000 Subject: [PATCH 18/19] fixing clone --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 3dcc32d578..8879116482 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -74,7 +74,7 @@ RUN \ if echo "$LOCAL_CHANGES" | grep -q "false"; then \ if [ -n "$FORK_NAME" ]; then \ rm -rf serve; \ - git clone --recursive https://github.com/pytorch/$FORK_NAME -b $BRANCH_NAME; \ + git clone --recursive https://github.com/$FORK_NAME -b $BRANCH_NAME; \ else \ rm -rf serve; \ git clone --recursive https://github.com/pytorch/serve.git -b $BRANCH_NAME; \ From 24d89dd38cb7e50abc52e3282664bb6e18aba2ff Mon Sep 17 00:00:00 2001 From: udai Date: Tue, 23 Jul 2024 18:58:20 +0000 Subject: [PATCH 19/19] testing repo --- docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 8879116482..7adb45f894 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -74,7 +74,7 @@ RUN \ if echo "$LOCAL_CHANGES" | grep -q "false"; then \ if [ -n "$FORK_NAME" ]; then \ rm -rf serve; \ - git clone --recursive https://github.com/$FORK_NAME -b $BRANCH_NAME; \ + git clone --recursive https://github.com/${FORK_NAME}.git -b $BRANCH_NAME; \ else \ rm -rf serve; \ git clone --recursive https://github.com/pytorch/serve.git -b $BRANCH_NAME; \ @@ -82,7 +82,7 @@ RUN \ fi -WORKDIR "serve" +WORKDIR $(basename $FORK_NAME) RUN cp docker/dockerd-entrypoint.sh /usr/local/bin/dockerd-entrypoint.sh