
5 changed files with 328 additions and 26 deletions
@ -0,0 +1,175 @@ |
|||||
|
# Byte-compiled / optimized / DLL files |
||||
|
__pycache__/ |
||||
|
*.py[cod] |
||||
|
*$py.class |
||||
|
|
||||
|
# C extensions |
||||
|
*.so |
||||
|
|
||||
|
# Distribution / packaging |
||||
|
.Python |
||||
|
build/ |
||||
|
develop-eggs/ |
||||
|
dist/ |
||||
|
downloads/ |
||||
|
eggs/ |
||||
|
.eggs/ |
||||
|
lib/ |
||||
|
lib64/ |
||||
|
parts/ |
||||
|
sdist/ |
||||
|
var/ |
||||
|
wheels/ |
||||
|
share/python-wheels/ |
||||
|
*.egg-info/ |
||||
|
.installed.cfg |
||||
|
*.egg |
||||
|
MANIFEST |
||||
|
|
||||
|
# PyInstaller |
||||
|
# Usually these files are written by a python script from a template |
||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it. |
||||
|
*.manifest |
||||
|
*.spec |
||||
|
|
||||
|
# Installer logs |
||||
|
pip-log.txt |
||||
|
pip-delete-this-directory.txt |
||||
|
|
||||
|
# Unit test / coverage reports |
||||
|
htmlcov/ |
||||
|
.tox/ |
||||
|
.nox/ |
||||
|
.coverage |
||||
|
.coverage.* |
||||
|
.cache |
||||
|
nosetests.xml |
||||
|
coverage.xml |
||||
|
*.cover |
||||
|
*.py,cover |
||||
|
.hypothesis/ |
||||
|
.pytest_cache/ |
||||
|
cover/ |
||||
|
|
||||
|
# Translations |
||||
|
*.mo |
||||
|
*.pot |
||||
|
|
||||
|
# Django stuff: |
||||
|
*.log |
||||
|
local_settings.py |
||||
|
db.sqlite3 |
||||
|
db.sqlite3-journal |
||||
|
|
||||
|
# Flask stuff: |
||||
|
instance/ |
||||
|
.webassets-cache |
||||
|
|
||||
|
# Scrapy stuff: |
||||
|
.scrapy |
||||
|
|
||||
|
# Sphinx documentation |
||||
|
docs/_build/ |
||||
|
|
||||
|
# PyBuilder |
||||
|
.pybuilder/ |
||||
|
target/ |
||||
|
|
||||
|
# Jupyter Notebook |
||||
|
.ipynb_checkpoints |
||||
|
|
||||
|
# IPython |
||||
|
profile_default/ |
||||
|
ipython_config.py |
||||
|
|
||||
|
# pyenv |
||||
|
# For a library or package, you might want to ignore these files since the code is |
||||
|
# intended to run in multiple environments; otherwise, check them in: |
||||
|
# .python-version |
||||
|
|
||||
|
# pipenv |
||||
|
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. |
||||
|
# However, in case of collaboration, if having platform-specific dependencies or dependencies |
||||
|
# having no cross-platform support, pipenv may install dependencies that don't work, or not |
||||
|
# install all needed dependencies. |
||||
|
#Pipfile.lock |
||||
|
|
||||
|
# poetry |
||||
|
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. |
||||
|
# This is especially recommended for binary packages to ensure reproducibility, and is more |
||||
|
# commonly ignored for libraries. |
||||
|
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control |
||||
|
#poetry.lock |
||||
|
|
||||
|
# pdm |
||||
|
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. |
||||
|
#pdm.lock |
||||
|
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it |
||||
|
# in version control. |
||||
|
# https://pdm.fming.dev/#use-with-ide |
||||
|
.pdm.toml |
||||
|
|
||||
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm |
||||
|
__pypackages__/ |
||||
|
|
||||
|
# Celery stuff |
||||
|
celerybeat-schedule |
||||
|
celerybeat.pid |
||||
|
|
||||
|
# SageMath parsed files |
||||
|
*.sage.py |
||||
|
|
||||
|
# Environments |
||||
|
.env |
||||
|
.venv |
||||
|
env/ |
||||
|
venv/ |
||||
|
ENV/ |
||||
|
env.bak/ |
||||
|
venv.bak/ |
||||
|
|
||||
|
# Spyder project settings |
||||
|
.spyderproject |
||||
|
.spyproject |
||||
|
|
||||
|
# Rope project settings |
||||
|
.ropeproject |
||||
|
|
||||
|
# mkdocs documentation |
||||
|
/site |
||||
|
|
||||
|
# mypy |
||||
|
.mypy_cache/ |
||||
|
.dmypy.json |
||||
|
dmypy.json |
||||
|
|
||||
|
# Pyre type checker |
||||
|
.pyre/ |
||||
|
|
||||
|
# pytype static type analyzer |
||||
|
.pytype/ |
||||
|
|
||||
|
# Cython debug symbols |
||||
|
cython_debug/ |
||||
|
|
||||
|
# PyCharm |
||||
|
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can |
||||
|
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore |
||||
|
# and can be added to the global gitignore or merged into this file. For a more nuclear |
||||
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder. |
||||
|
.idea/ |
||||
|
|
||||
|
# VSCode |
||||
|
.vscode/ |
||||
|
|
||||
|
# DS Store |
||||
|
.DS_Store |
||||
|
|
||||
|
# Results |
||||
|
*.csv |
||||
|
|
||||
|
# Python pickle files |
||||
|
*.pkl |
||||
|
|
||||
|
# Sphinx documentation |
||||
|
_build/ |
@ -1,14 +1,22 @@ |
|||||
# VLLM项目 |
## 安装环境 |
||||
|
|
||||
## 项目启动 |
```bash |
||||
bash run_model_predict.sh |
conda create -n vllm python=3.8 |
||||
bash run_api.sh |
pip install -r requirements.txt |
||||
|
``` |
||||
|
|
||||
## 调用示例 |
## 启动项目 |
||||
"http://192.168.31.74:12000/predict" |
|
||||
|
|
||||
{ |
```bash |
||||
"texts": "你好" |
conda activate vllm |
||||
} |
bash run_api_nohup.sh |
||||
## 返回示例 |
bash run_model.sh |
||||
## 请求参数 |
``` |
||||
|
|
||||
|
## 测试 |
||||
|
|
||||
|
```bash |
||||
|
curl -H "Content-Type: application/json" -X POST -d '{"texts": "User: 你好\nAssistant:"}' http://192.168.31.149:12000/predict |
||||
|
curl -H "Content-Type: application/json" -X POST -d '{"id": "b412fc98-bdd7-11ee-8d23-d5e5c66dd02e"}' http://192.168.31.149:12000/search |
||||
|
``` |
||||
|
返回"status_code"不出现 400 则调用成功 |
@ -0,0 +1,30 @@ |
|||||
|
Flask==3.0.0 |
||||
|
gevent==23.9.1 |
||||
|
greenlet==3.0.3 |
||||
|
gunicorn==21.2.0 |
||||
|
numpy==1.26.3 |
||||
|
nvidia-cublas-cu12==12.1.3.1 |
||||
|
nvidia-cuda-cupti-cu12==12.1.105 |
||||
|
nvidia-cuda-nvrtc-cu12==12.1.105 |
||||
|
nvidia-cuda-runtime-cu12==12.1.105 |
||||
|
nvidia-cudnn-cu12==8.9.2.26 |
||||
|
nvidia-cufft-cu12==11.0.2.54 |
||||
|
nvidia-curand-cu12==10.3.2.106 |
||||
|
nvidia-cusolver-cu12==11.4.5.107 |
||||
|
nvidia-cusparse-cu12==12.1.0.106 |
||||
|
nvidia-nccl-cu12==2.18.1 |
||||
|
nvidia-nvjitlink-cu12==12.3.101 |
||||
|
nvidia-nvtx-cu12==12.1.105 |
||||
|
pandas==2.1.4 |
||||
|
redis==5.0.1 |
||||
|
requests==2.31.0 |
||||
|
safetensors==0.4.1 |
||||
|
tokenizers==0.15.0 |
||||
|
torch==2.1.2 |
||||
|
tqdm==4.66.1 |
||||
|
transformers==4.36.2 |
||||
|
urllib3==2.1.0 |
||||
|
uvicorn==0.25.0 |
||||
|
vllm==0.2.0 |
||||
|
xformers==0.0.23.post1 |
||||
|
|
Loading…
Reference in new issue