-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14e938c
commit d71a6b3
Showing
5 changed files
with
98 additions
and
7 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,39 @@ | ||
name: upload-to-pypi | ||
|
||
on: | ||
create: | ||
tags: | ||
- "*" | ||
|
||
env: | ||
WORKSPACE_PREFIX: $(echo $GITHUB_WORKSPACE |cut -d '/' -f 1-4) | ||
SLURM_PARTITION: llm_s | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
|
||
jobs: | ||
build-and-upload: | ||
runs-on: [t_cluster] | ||
steps: | ||
- name: mask env | ||
run: | | ||
echo "::add-mask::${{env.WORKSPACE_PREFIX}}" | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: install dependencies | ||
run: | | ||
pip install setuptools wheel twine | ||
- name: get latest tag | ||
run: | | ||
latest_tag=$(git describe --tags --abbrev=0) | ||
echo "$latest_tag" > version.txt | ||
- name: build and upload package | ||
run: | | ||
export PYTHONPATH=$PWD:$PYTHONPATH | ||
source /mnt/petrelfs/share_data/llm_env/env/llm-flash2.0 | ||
srun -p ${SLURM_PARTITION} --kill-on-bad-exit=1 --job-name=internlm-ut-${GITHUB_RUN_ID}-${GITHUB_JOB} -N 1 -n 1 --gres=gpu:1 python setup.py sdist bdist_wheel | ||
twine upload -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} 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
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 |
---|---|---|
|
@@ -14,4 +14,5 @@ botocore | |
torch-scatter | ||
pyecharts | ||
py-libnuma | ||
tensorboard | ||
-f https://data.pyg.org/whl/torch-1.13.1+cu117.html |
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,37 @@ | ||
import os | ||
import re | ||
import sys | ||
import subprocess | ||
from setuptools import setup, find_packages | ||
from setuptools.command.install import install | ||
|
||
pwd = os.path.dirname(__file__) | ||
|
||
def readme(): | ||
with open(os.path.join(pwd, 'README.md'), encoding='utf-8') as f: | ||
content = f.read() | ||
return content | ||
|
||
def get_version(): | ||
with open(os.path.join(pwd, 'version.txt'), 'r') as f: | ||
content = f.read() | ||
return content | ||
|
||
setup( | ||
name='InternEvo', | ||
version=get_version(), | ||
description='an open-sourced lightweight training framework aims to support model pre-training without the need for extensive dependencies', | ||
long_description=readme(), | ||
long_description_content_type='text/markdown', | ||
packages=find_packages(), | ||
|
||
classifiers=[ | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Programming Language :: Python :: 3.11', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: Education', | ||
'Intended Audience :: Science/Research', | ||
], | ||
) |