-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #182 from OpenBMB/dev
BMTrain New Version Release v1.0.0
- Loading branch information
Showing
78 changed files
with
3,492 additions
and
1,772 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
branches: | ||
- 'dev' | ||
- 'main' | ||
|
||
jobs: | ||
build-archive-wheel: | ||
|
||
uses: OpenBMB/BMTrain/.github/workflows/build_whl.yml@workflow | ||
secrets: | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
|
||
publish: | ||
needs: build-archive-wheel | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set Up the Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Download distribution files | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Build wheels in docker and archive | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
DOCKERHUB_TOKEN: | ||
required: true | ||
DOCKERHUB_USERNAME: | ||
required: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['37', '38', '39', '310', '311'] | ||
|
||
|
||
steps: | ||
|
||
- name: Check the disk space and clear unnecessary library | ||
run: | | ||
rm -rf /home/runner/work/BMTrain/BMTrain/dist | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf "/usr/local/share/boost" | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
df -hl | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Pull Docker image | ||
run: docker pull pytorch/manylinux-cuda113:latest | ||
|
||
- name: Run Docker image and execute script | ||
run: | | ||
version=${{ matrix.python-version }} | ||
docker run -e BUILD_DOCKER_ENV=1 -e CUDACXX=/usr/local/cuda-11.3/bin/nvcc -e PATH="/opt/rh/devtoolset-9/root/usr/bin:$PATH" -e LD_LIBRARY_PATH="/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:$LD_LIBRARY_PATH" -v ${{ github.workspace }}:/workspace/BMTrain -i pytorch/manylinux-cuda113:latest /bin/bash -c "cd /workspace/BMTrain;/opt/python/cp${version}*/bin/pip install build; /opt/python/cp${version}*/bin/python -m build .;for file in dist/*-linux_x86_64.whl; do mv \"\$file\" \"\${file//-linux_x86_64/-manylinux2014_x86_64}\"; done" | ||
- name: Archive distribution files | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: | | ||
dist/*.tar.gz | ||
dist/*.whl | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,4 +150,6 @@ log | |
.vscode | ||
|
||
!bmtrain/dist | ||
tests/test_log.txt | ||
tests/test_log.txt | ||
tests/*.opt | ||
tests/*.ckp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.