[ci] replace the ngc docker image with self-built pytorch image
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index b50add842379..c9a904e42603 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -14,7 +14,7 @@ jobs:
         contains( github.event.pull_request.labels.*.name, 'Run Build and Test')
     runs-on: [self-hosted, gpu]
     container:
-      image: nvcr.io/nvidia/pytorch:21.07-py3
+      image: frankleeeee/pytorch-cuda:1.10.1-11.3.0
       options: --gpus all --rm --ipc=host -v /data/scratch/cifar-10:/data/scratch/cifar-10
     timeout-minutes: 40
     steps:
@@ -32,6 +32,6 @@ jobs:
           pip install -v --no-cache-dir .
       - name: Unit Testing
         run: |
-          pytest tests
+          PYTHONPATH=$PWD pytest tests
         env:
           DATA: /data/scratch/cifar-10
diff --git a/.github/workflows/compatibility_test.yml b/.github/workflows/compatibility_test.yml
index c87c13246055..0e3eddb9b67a 100644
--- a/.github/workflows/compatibility_test.yml
+++ b/.github/workflows/compatibility_test.yml
@@ -14,10 +14,10 @@ jobs:
         # 20.10: PyTorch 1.7.0a0+7036e91 + Python 3.8
         # 20.12: PyTorch 1.8.0a0+1606899 + Python 3.8
         # 21.06: PyTorch 1.9.0a0+c3d40fd + Python 3.8
-        container: ["nvcr.io/nvidia/pytorch:20.07-py3", 
-                    "nvcr.io/nvidia/pytorch:20.10-py3", 
-                    "nvcr.io/nvidia/pytorch:20.12-py3", 
-                    "nvcr.io/nvidia/pytorch:21.06-py3"]
+        container: ["frankleeeee/pytorch-cuda:1.9.0-11.1.1",
+                    "frankleeeee/pytorch-cuda:1.8.1-11.1.1",
+                    "frankleeeee/pytorch-cuda:1.7.1-11.0.3",
+                    "frankleeeee/pytorch-cuda:1.6.0-10.2"]
     container:
       image: ${{ matrix.container }}
       options: --gpus all --rm --ipc=host -v /data/scratch/cifar-10:/data/scratch/cifar-10
@@ -35,7 +35,7 @@ jobs:
           pip install -v --no-cache-dir .
       - name: Unit Testing
         run: |
-          pytest tests
+          PYTHONPATH=$PWD pytest tests
         env:
           DATA: /data/scratch/cifar-10
       

Fixed the workflow problem mentioned in #671 .