diff --git a/.gitignore b/.gitignore index 37a3805..7f4f82d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,19 @@ .idea/* -.DS_Store \ No newline at end of file +.DS_Store + +# compilation and distribution +__pycache__ +_ext +*.pyc +*.pyd +*.so +*.dll +*.egg-info/ +build/ +dist/ +wheels/ + +# editor settings +.idea +.vscode +_darcs \ No newline at end of file diff --git a/README.md b/README.md index 8e00ed8..35cab34 100644 --- a/README.md +++ b/README.md @@ -127,10 +127,15 @@ We list the parameters and pretrained checkpoint of ONE-PEACE below. * Python >= 3.7 * Pytorch >= 1.10.0 (recommend 1.13.1) * CUDA Version >= 10.2 (recommend 11.6) -* Install required packages: +* Install ONE-PEACE +``` +python -m pip install git+https://github.com/OFA-Sys/ONE-PEACE.git +``` +* Or clone the repository locally and install with: ```bash git clone https://github.com/OFA-Sys/ONE-PEACE -pip install -r requirements.txt +cd ONE-PEACE +python -m pip install -e . ``` * For faster training install [Apex](https://github.com/NVIDIA/apex) library (recommended but not necessary): ```bash diff --git a/requirements.txt b/requirements.txt index 816a308..0a40271 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -./fairseq/ opencv-python==4.7.0.72 requests==2.28.1 tensorboardX==2.6 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..d5467e1 --- /dev/null +++ b/setup.py @@ -0,0 +1,21 @@ +import os + +import pkg_resources +from setuptools import setup, find_packages + +setup( + name="one_peace", + py_modules=["one_peace"], + version="1.0", + description="", + author="M6", + packages=find_packages(exclude=["one_peace_vision"]), + install_requires=[ + str(r) + for r in pkg_resources.parse_requirements( + open(os.path.join(os.path.dirname(__file__), "requirements.txt")) + ) + ], + include_package_data=True, + extras_require={"dev": ["pytest"]}, +)