7
7
workflow_dispatch :
8
8
pull_request :
9
9
10
+
10
11
jobs :
11
12
build_docs_job :
12
13
runs-on : ${{ matrix.os }}
@@ -16,89 +17,90 @@ jobs:
16
17
strategy :
17
18
matrix :
18
19
include :
19
- - os : linux.20_04 .4x
20
- python-version : 3.9
21
- python-tag : " py39"
20
+ - os : linux.24_04 .4x
21
+ python-version : 3.9
22
+ python-tag : " py39"
22
23
steps :
23
- - name : Check ldd --version
24
- run : ldd --version
25
- - name : Checkout
26
- uses : actions/checkout@v4
27
- # Update references
28
- - name : Update pip
29
- run : |
30
- sudo apt-get update
31
- sudo apt-get -y install python3-pip
32
- sudo pip3 install --upgrade pip
33
- - name : Setup conda
34
- run : |
35
- wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
36
- bash ~/miniconda.sh -b -p $HOME/miniconda
37
- - name : setup Path
38
- run : |
39
- echo "/home/ec2-user/miniconda/bin" >> $GITHUB_PATH
40
- echo "CONDA=/home/ec2-user/miniconda" >> $GITHUB_PATH
41
- - name : create conda env
42
- run : |
43
- conda create --name build_binary python=${{ matrix.python-version }}
44
- conda info
45
- - name : check python version no Conda
46
- run : |
47
- python --version
48
- - name : check python version
49
- run : |
50
- conda run -n build_binary python --version
51
- - name : Install gcc
52
- shell : bash
53
- run : |
54
- sudo apt-get install build-essential
55
- - name : setup Path
56
- run : |
57
- echo /usr/local/bin >> $GITHUB_PATH
58
- - name : Install PyTorch
59
- shell : bash
60
- run : |
61
- conda run -n build_binary pip install torch --index-url https://download.pytorch.org/whl/nightly/cpu
62
- - name : Install fbgemm
63
- run : |
64
- conda run -n build_binary pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/cpu
65
- - name : Install torchmetrics
66
- run : |
67
- conda run -n build_binary pip install torchmetrics==1.0.3
68
- - name : Install TorchRec
69
- run : |
70
- conda run -n build_binary pip install -r requirements.txt
71
- conda run -n build_binary python setup.py bdist_wheel --python-tag=${{ matrix.python-tag }}
72
- - name : Test fbgemm_gpu and torchrec installation
73
- shell : bash
74
- run : |
75
- conda run -n build_binary \
76
- python -c "import fbgemm_gpu"
77
- conda run -n build_binary \
78
- python -c "import torchrec"
79
- - name : Build the docset
80
- run : |
81
- conda run -n build_binary python -m pip install -r docs/requirements.txt
82
- cd ./docs
83
- conda run -n build_binary make html
84
- cd ..
85
- - name : Upload Built-Docs
86
- uses : actions/upload-artifact@v4
87
- with :
88
- name : Built-Docs
89
- path : docs/build/html/
90
- - name : Get output time
91
- run : echo "The time was ${{ steps.build.outputs.time }}"
92
- - name : Deploy
93
- if : github.ref == 'refs/heads/main'
94
- uses : JamesIves/github-pages-deploy-action@releases/v3
95
- with :
24
+ - name : Check ldd --version
25
+ run : ldd --version
26
+ - name : Checkout
27
+ uses : actions/checkout@v4
28
+ # Update references
29
+ - name : Update pip
30
+ run : |
31
+ sudo apt-get update
32
+ sudo apt-get -y install python3-pip
33
+ sudo pip3 install --upgrade pip
34
+ - name : Setup conda
35
+ run : |
36
+ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
37
+ bash ~/miniconda.sh -b -p $HOME/miniconda
38
+ - name : setup Path
39
+ run : |
40
+ echo "/home/ec2-user/miniconda/bin" >> $GITHUB_PATH
41
+ echo "CONDA=/home/ec2-user/miniconda" >> $GITHUB_PATH
42
+ - name : create conda env
43
+ run : |
44
+ conda create --name build_binary python=${{ matrix.python-version }}
45
+ conda info
46
+ - name : check python version no Conda
47
+ run : |
48
+ python --version
49
+ - name : check python version
50
+ run : |
51
+ conda run -n build_binary python --version
52
+ - name : Install gcc
53
+ shell : bash
54
+ run : |
55
+ sudo apt-get install build-essential
56
+ - name : setup Path
57
+ run : |
58
+ echo /usr/local/bin >> $GITHUB_PATH
59
+ - name : Install PyTorch
60
+ shell : bash
61
+ run : |
62
+ conda run -n build_binary pip install torch --index-url https://download.pytorch.org/whl/nightly/cpu
63
+ - name : Install fbgemm
64
+ run : |
65
+ conda run -n build_binary pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/cpu
66
+ - name : Install torchmetrics
67
+ run : |
68
+ conda run -n build_binary pip install torchmetrics==1.0.3
69
+ - name : Install TorchRec
70
+ run : |
71
+ conda run -n build_binary pip install -r requirements.txt
72
+ conda run -n build_binary python setup.py bdist_wheel --python-tag=${{ matrix.python-tag }}
73
+ - name : Test fbgemm_gpu and torchrec installation
74
+ shell : bash
75
+ run : |
76
+ conda run -n build_binary \
77
+ python -c "import fbgemm_gpu"
78
+ conda run -n build_binary \
79
+ python -c "import torchrec"
80
+ - name : Build the docset
81
+ run : |
82
+ conda run -n build_binary python -m pip install -r docs/requirements.txt
83
+ cd ./docs
84
+ conda run -n build_binary make html
85
+ cd ..
86
+ - name : Upload Built-Docs
87
+ uses : actions/upload-artifact@v4
88
+ with :
89
+ name : Built-Docs
90
+ path : docs/build/html/
91
+ - name : Get output time
92
+ run : echo "The time was ${{ steps.build.outputs.time }}"
93
+ - name : Deploy
94
+ if : github.ref == 'refs/heads/main'
95
+ uses : JamesIves/github-pages-deploy-action@releases/v3
96
+ with :
96
97
ACCESS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
97
98
BRANCH : gh-pages # The branch the action should deploy to.
98
99
FOLDER : docs/build/html # The folder the action should deploy.
99
100
100
101
doc-preview :
101
- runs-on : [linux.2xlarge]
102
+ runs-on :
103
+ - linux.2xlarge
102
104
needs : build_docs_job
103
105
if : ${{ github.event_name == 'pull_request' }}
104
106
steps :
0 commit comments