1
This commit is contained in:
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
324
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
324
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,324 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<Languages>
|
||||
<language minSize="114" name="Python" />
|
||||
</Languages>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoredPackages">
|
||||
<value>
|
||||
<list size="290">
|
||||
<item index="0" class="java.lang.String" itemvalue="mmcv" />
|
||||
<item index="1" class="java.lang.String" itemvalue="celery" />
|
||||
<item index="2" class="java.lang.String" itemvalue="uWSGI" />
|
||||
<item index="3" class="java.lang.String" itemvalue="torch" />
|
||||
<item index="4" class="java.lang.String" itemvalue="torchvision" />
|
||||
<item index="5" class="java.lang.String" itemvalue="boto3" />
|
||||
<item index="6" class="java.lang.String" itemvalue="botocore" />
|
||||
<item index="7" class="java.lang.String" itemvalue="geventhttpclient" />
|
||||
<item index="8" class="java.lang.String" itemvalue="mysql-connector-python" />
|
||||
<item index="9" class="java.lang.String" itemvalue="tiktoken" />
|
||||
<item index="10" class="java.lang.String" itemvalue="pandas" />
|
||||
<item index="11" class="java.lang.String" itemvalue="opencv-python" />
|
||||
<item index="12" class="java.lang.String" itemvalue="gevent" />
|
||||
<item index="13" class="java.lang.String" itemvalue="numpy" />
|
||||
<item index="14" class="java.lang.String" itemvalue="requests" />
|
||||
<item index="15" class="java.lang.String" itemvalue="flask" />
|
||||
<item index="16" class="java.lang.String" itemvalue="sqlalchemy" />
|
||||
<item index="17" class="java.lang.String" itemvalue="Babel" />
|
||||
<item index="18" class="java.lang.String" itemvalue="scikit-learn" />
|
||||
<item index="19" class="java.lang.String" itemvalue="pickleshare" />
|
||||
<item index="20" class="java.lang.String" itemvalue="defusedxml" />
|
||||
<item index="21" class="java.lang.String" itemvalue="executing" />
|
||||
<item index="22" class="java.lang.String" itemvalue="gitdb" />
|
||||
<item index="23" class="java.lang.String" itemvalue="ipython-genutils" />
|
||||
<item index="24" class="java.lang.String" itemvalue="sentry-sdk" />
|
||||
<item index="25" class="java.lang.String" itemvalue="PyQt5" />
|
||||
<item index="26" class="java.lang.String" itemvalue="bleach" />
|
||||
<item index="27" class="java.lang.String" itemvalue="jupyter_server_terminals" />
|
||||
<item index="28" class="java.lang.String" itemvalue="soupsieve" />
|
||||
<item index="29" class="java.lang.String" itemvalue="torchaudio" />
|
||||
<item index="30" class="java.lang.String" itemvalue="jsonschema" />
|
||||
<item index="31" class="java.lang.String" itemvalue="pywin32" />
|
||||
<item index="32" class="java.lang.String" itemvalue="qtconsole" />
|
||||
<item index="33" class="java.lang.String" itemvalue="terminado" />
|
||||
<item index="34" class="java.lang.String" itemvalue="comm" />
|
||||
<item index="35" class="java.lang.String" itemvalue="GitPython" />
|
||||
<item index="36" class="java.lang.String" itemvalue="jupyterlab-pygments" />
|
||||
<item index="37" class="java.lang.String" itemvalue="pandas-stubs" />
|
||||
<item index="38" class="java.lang.String" itemvalue="ipykernel" />
|
||||
<item index="39" class="java.lang.String" itemvalue="nbconvert" />
|
||||
<item index="40" class="java.lang.String" itemvalue="psutil" />
|
||||
<item index="41" class="java.lang.String" itemvalue="PyQtWebEngine" />
|
||||
<item index="42" class="java.lang.String" itemvalue="jedi" />
|
||||
<item index="43" class="java.lang.String" itemvalue="jupyter_server" />
|
||||
<item index="44" class="java.lang.String" itemvalue="pure-eval" />
|
||||
<item index="45" class="java.lang.String" itemvalue="asttokens" />
|
||||
<item index="46" class="java.lang.String" itemvalue="jsonpatch" />
|
||||
<item index="47" class="java.lang.String" itemvalue="referencing" />
|
||||
<item index="48" class="java.lang.String" itemvalue="PyJWT" />
|
||||
<item index="49" class="java.lang.String" itemvalue="decorator" />
|
||||
<item index="50" class="java.lang.String" itemvalue="smmap" />
|
||||
<item index="51" class="java.lang.String" itemvalue="json5" />
|
||||
<item index="52" class="java.lang.String" itemvalue="pandocfilters" />
|
||||
<item index="53" class="java.lang.String" itemvalue="jupyter-events" />
|
||||
<item index="54" class="java.lang.String" itemvalue="websocket-client" />
|
||||
<item index="55" class="java.lang.String" itemvalue="jupyter" />
|
||||
<item index="56" class="java.lang.String" itemvalue="stack-data" />
|
||||
<item index="57" class="java.lang.String" itemvalue="nest-asyncio" />
|
||||
<item index="58" class="java.lang.String" itemvalue="prompt-toolkit" />
|
||||
<item index="59" class="java.lang.String" itemvalue="ipywidgets" />
|
||||
<item index="60" class="java.lang.String" itemvalue="scipy" />
|
||||
<item index="61" class="java.lang.String" itemvalue="tornado" />
|
||||
<item index="62" class="java.lang.String" itemvalue="amqp" />
|
||||
<item index="63" class="java.lang.String" itemvalue="jsonpointer" />
|
||||
<item index="64" class="java.lang.String" itemvalue="Send2Trash" />
|
||||
<item index="65" class="java.lang.String" itemvalue="plotly" />
|
||||
<item index="66" class="java.lang.String" itemvalue="et-xmlfile" />
|
||||
<item index="67" class="java.lang.String" itemvalue="overrides" />
|
||||
<item index="68" class="java.lang.String" itemvalue="PyQtChart" />
|
||||
<item index="69" class="java.lang.String" itemvalue="docker-pycreds" />
|
||||
<item index="70" class="java.lang.String" itemvalue="mistune" />
|
||||
<item index="71" class="java.lang.String" itemvalue="pathtools" />
|
||||
<item index="72" class="java.lang.String" itemvalue="future" />
|
||||
<item index="73" class="java.lang.String" itemvalue="jupyter-console" />
|
||||
<item index="74" class="java.lang.String" itemvalue="debugpy" />
|
||||
<item index="75" class="java.lang.String" itemvalue="click-repl" />
|
||||
<item index="76" class="java.lang.String" itemvalue="setproctitle" />
|
||||
<item index="77" class="java.lang.String" itemvalue="webencodings" />
|
||||
<item index="78" class="java.lang.String" itemvalue="notebook_shim" />
|
||||
<item index="79" class="java.lang.String" itemvalue="traitlets" />
|
||||
<item index="80" class="java.lang.String" itemvalue="protobuf" />
|
||||
<item index="81" class="java.lang.String" itemvalue="pywinpty" />
|
||||
<item index="82" class="java.lang.String" itemvalue="rfc3339-validator" />
|
||||
<item index="83" class="java.lang.String" itemvalue="joblib" />
|
||||
<item index="84" class="java.lang.String" itemvalue="threadpoolctl" />
|
||||
<item index="85" class="java.lang.String" itemvalue="arrow" />
|
||||
<item index="86" class="java.lang.String" itemvalue="nbclient" />
|
||||
<item index="87" class="java.lang.String" itemvalue="QtPy" />
|
||||
<item index="88" class="java.lang.String" itemvalue="kombu" />
|
||||
<item index="89" class="java.lang.String" itemvalue="tinycss2" />
|
||||
<item index="90" class="java.lang.String" itemvalue="appdirs" />
|
||||
<item index="91" class="java.lang.String" itemvalue="python-json-logger" />
|
||||
<item index="92" class="java.lang.String" itemvalue="jupyterlab-widgets" />
|
||||
<item index="93" class="java.lang.String" itemvalue="pip" />
|
||||
<item index="94" class="java.lang.String" itemvalue="pyzmq" />
|
||||
<item index="95" class="java.lang.String" itemvalue="PyQt5_sip" />
|
||||
<item index="96" class="java.lang.String" itemvalue="vine" />
|
||||
<item index="97" class="java.lang.String" itemvalue="notebook" />
|
||||
<item index="98" class="java.lang.String" itemvalue="beautifulsoup4" />
|
||||
<item index="99" class="java.lang.String" itemvalue="isoduration" />
|
||||
<item index="100" class="java.lang.String" itemvalue="jupyter-lsp" />
|
||||
<item index="101" class="java.lang.String" itemvalue="fqdn" />
|
||||
<item index="102" class="java.lang.String" itemvalue="jupyter_client" />
|
||||
<item index="103" class="java.lang.String" itemvalue="jupyterlab_server" />
|
||||
<item index="104" class="java.lang.String" itemvalue="unicodedata2" />
|
||||
<item index="105" class="java.lang.String" itemvalue="backcall" />
|
||||
<item index="106" class="java.lang.String" itemvalue="PySocks" />
|
||||
<item index="107" class="java.lang.String" itemvalue="configparser" />
|
||||
<item index="108" class="java.lang.String" itemvalue="widgetsnbextension" />
|
||||
<item index="109" class="java.lang.String" itemvalue="langsmith" />
|
||||
<item index="110" class="java.lang.String" itemvalue="matplotlib-inline" />
|
||||
<item index="111" class="java.lang.String" itemvalue="webcolors" />
|
||||
<item index="112" class="java.lang.String" itemvalue="types-pytz" />
|
||||
<item index="113" class="java.lang.String" itemvalue="wcwidth" />
|
||||
<item index="114" class="java.lang.String" itemvalue="jupyter_core" />
|
||||
<item index="115" class="java.lang.String" itemvalue="click-didyoumean" />
|
||||
<item index="116" class="java.lang.String" itemvalue="rfc3986-validator" />
|
||||
<item index="117" class="java.lang.String" itemvalue="types-python-dateutil" />
|
||||
<item index="118" class="java.lang.String" itemvalue="jsonschema-specifications" />
|
||||
<item index="119" class="java.lang.String" itemvalue="rpds-py" />
|
||||
<item index="120" class="java.lang.String" itemvalue="uri-template" />
|
||||
<item index="121" class="java.lang.String" itemvalue="wandb" />
|
||||
<item index="122" class="java.lang.String" itemvalue="urllib3" />
|
||||
<item index="123" class="java.lang.String" itemvalue="jupyterlab" />
|
||||
<item index="124" class="java.lang.String" itemvalue="Cython" />
|
||||
<item index="125" class="java.lang.String" itemvalue="billiard" />
|
||||
<item index="126" class="java.lang.String" itemvalue="parso" />
|
||||
<item index="127" class="java.lang.String" itemvalue="nbformat" />
|
||||
<item index="128" class="java.lang.String" itemvalue="ipython" />
|
||||
<item index="129" class="java.lang.String" itemvalue="fastjsonschema" />
|
||||
<item index="130" class="java.lang.String" itemvalue="prometheus-client" />
|
||||
<item index="131" class="java.lang.String" itemvalue="jmespath" />
|
||||
<item index="132" class="java.lang.String" itemvalue="win-inet-pton" />
|
||||
<item index="133" class="java.lang.String" itemvalue="s3transfer" />
|
||||
<item index="134" class="java.lang.String" itemvalue="munkres" />
|
||||
<item index="135" class="java.lang.String" itemvalue="async-lru" />
|
||||
<item index="136" class="java.lang.String" itemvalue="click-plugins" />
|
||||
<item index="137" class="java.lang.String" itemvalue="openpyxl" />
|
||||
<item index="138" class="java.lang.String" itemvalue="httpx" />
|
||||
<item index="139" class="java.lang.String" itemvalue="greenlet" />
|
||||
<item index="140" class="java.lang.String" itemvalue="PyYAML" />
|
||||
<item index="141" class="java.lang.String" itemvalue="marshmallow" />
|
||||
<item index="142" class="java.lang.String" itemvalue="pycparser" />
|
||||
<item index="143" class="java.lang.String" itemvalue="markdown-it-py" />
|
||||
<item index="144" class="java.lang.String" itemvalue="redis" />
|
||||
<item index="145" class="java.lang.String" itemvalue="Pygments" />
|
||||
<item index="146" class="java.lang.String" itemvalue="langchain" />
|
||||
<item index="147" class="java.lang.String" itemvalue="mmcv-full" />
|
||||
<item index="148" class="java.lang.String" itemvalue="pydantic" />
|
||||
<item index="149" class="java.lang.String" itemvalue="Werkzeug" />
|
||||
<item index="150" class="java.lang.String" itemvalue="loguru" />
|
||||
<item index="151" class="java.lang.String" itemvalue="click" />
|
||||
<item index="152" class="java.lang.String" itemvalue="attrs" />
|
||||
<item index="153" class="java.lang.String" itemvalue="contourpy" />
|
||||
<item index="154" class="java.lang.String" itemvalue="dataclasses-json" />
|
||||
<item index="155" class="java.lang.String" itemvalue="openai" />
|
||||
<item index="156" class="java.lang.String" itemvalue="regex" />
|
||||
<item index="157" class="java.lang.String" itemvalue="langchainplus-sdk" />
|
||||
<item index="158" class="java.lang.String" itemvalue="platformdirs" />
|
||||
<item index="159" class="java.lang.String" itemvalue="matplotlib" />
|
||||
<item index="160" class="java.lang.String" itemvalue="PyMySQL" />
|
||||
<item index="161" class="java.lang.String" itemvalue="httpcore" />
|
||||
<item index="162" class="java.lang.String" itemvalue="idna" />
|
||||
<item index="163" class="java.lang.String" itemvalue="networkx" />
|
||||
<item index="164" class="java.lang.String" itemvalue="cffi" />
|
||||
<item index="165" class="java.lang.String" itemvalue="sniffio" />
|
||||
<item index="166" class="java.lang.String" itemvalue="exceptiongroup" />
|
||||
<item index="167" class="java.lang.String" itemvalue="win32-setctime" />
|
||||
<item index="168" class="java.lang.String" itemvalue="pyOpenSSL" />
|
||||
<item index="169" class="java.lang.String" itemvalue="zipp" />
|
||||
<item index="170" class="java.lang.String" itemvalue="mdurl" />
|
||||
<item index="171" class="java.lang.String" itemvalue="tenacity" />
|
||||
<item index="172" class="java.lang.String" itemvalue="google-search-results" />
|
||||
<item index="173" class="java.lang.String" itemvalue="itsdangerous" />
|
||||
<item index="174" class="java.lang.String" itemvalue="blinker" />
|
||||
<item index="175" class="java.lang.String" itemvalue="addict" />
|
||||
<item index="176" class="java.lang.String" itemvalue="termcolor" />
|
||||
<item index="177" class="java.lang.String" itemvalue="importlib-resources" />
|
||||
<item index="178" class="java.lang.String" itemvalue="mpmath" />
|
||||
<item index="179" class="java.lang.String" itemvalue="typing_extensions" />
|
||||
<item index="180" class="java.lang.String" itemvalue="langchain-core" />
|
||||
<item index="181" class="java.lang.String" itemvalue="argon2-cffi" />
|
||||
<item index="182" class="java.lang.String" itemvalue="multidict" />
|
||||
<item index="183" class="java.lang.String" itemvalue="yarl" />
|
||||
<item index="184" class="java.lang.String" itemvalue="pycryptodome" />
|
||||
<item index="185" class="java.lang.String" itemvalue="pytz" />
|
||||
<item index="186" class="java.lang.String" itemvalue="cuda-python" />
|
||||
<item index="187" class="java.lang.String" itemvalue="Pillow" />
|
||||
<item index="188" class="java.lang.String" itemvalue="mysqlclient" />
|
||||
<item index="189" class="java.lang.String" itemvalue="mysql-connector" />
|
||||
<item index="190" class="java.lang.String" itemvalue="python-dateutil" />
|
||||
<item index="191" class="java.lang.String" itemvalue="Brotli" />
|
||||
<item index="192" class="java.lang.String" itemvalue="tritonclient" />
|
||||
<item index="193" class="java.lang.String" itemvalue="h11" />
|
||||
<item index="194" class="java.lang.String" itemvalue="cycler" />
|
||||
<item index="195" class="java.lang.String" itemvalue="MarkupSafe" />
|
||||
<item index="196" class="java.lang.String" itemvalue="frozenlist" />
|
||||
<item index="197" class="java.lang.String" itemvalue="fsspec" />
|
||||
<item index="198" class="java.lang.String" itemvalue="filelock" />
|
||||
<item index="199" class="java.lang.String" itemvalue="certifi" />
|
||||
<item index="200" class="java.lang.String" itemvalue="anyio" />
|
||||
<item index="201" class="java.lang.String" itemvalue="pyparsing" />
|
||||
<item index="202" class="java.lang.String" itemvalue="mmengine" />
|
||||
<item index="203" class="java.lang.String" itemvalue="sympy" />
|
||||
<item index="204" class="java.lang.String" itemvalue="cryptography" />
|
||||
<item index="205" class="java.lang.String" itemvalue="kiwisolver" />
|
||||
<item index="206" class="java.lang.String" itemvalue="zope.interface" />
|
||||
<item index="207" class="java.lang.String" itemvalue="fonttools" />
|
||||
<item index="208" class="java.lang.String" itemvalue="argon2-cffi-bindings" />
|
||||
<item index="209" class="java.lang.String" itemvalue="charset-normalizer" />
|
||||
<item index="210" class="java.lang.String" itemvalue="mkl-service" />
|
||||
<item index="211" class="java.lang.String" itemvalue="numexpr" />
|
||||
<item index="212" class="java.lang.String" itemvalue="distro" />
|
||||
<item index="213" class="java.lang.String" itemvalue="async-timeout" />
|
||||
<item index="214" class="java.lang.String" itemvalue="jwt" />
|
||||
<item index="215" class="java.lang.String" itemvalue="yapf" />
|
||||
<item index="216" class="java.lang.String" itemvalue="SQLAlchemy" />
|
||||
<item index="217" class="java.lang.String" itemvalue="mypy-extensions" />
|
||||
<item index="218" class="java.lang.String" itemvalue="minio" />
|
||||
<item index="219" class="java.lang.String" itemvalue="importlib-metadata" />
|
||||
<item index="220" class="java.lang.String" itemvalue="Jinja2" />
|
||||
<item index="221" class="java.lang.String" itemvalue="tomli" />
|
||||
<item index="222" class="java.lang.String" itemvalue="zope.event" />
|
||||
<item index="223" class="java.lang.String" itemvalue="Flask" />
|
||||
<item index="224" class="java.lang.String" itemvalue="six" />
|
||||
<item index="225" class="java.lang.String" itemvalue="tzdata" />
|
||||
<item index="226" class="java.lang.String" itemvalue="python-rapidjson" />
|
||||
<item index="227" class="java.lang.String" itemvalue="rich" />
|
||||
<item index="228" class="java.lang.String" itemvalue="openapi-schema-pydantic" />
|
||||
<item index="229" class="java.lang.String" itemvalue="packaging" />
|
||||
<item index="230" class="java.lang.String" itemvalue="tqdm" />
|
||||
<item index="231" class="java.lang.String" itemvalue="typing-inspect" />
|
||||
<item index="232" class="java.lang.String" itemvalue="colorama" />
|
||||
<item index="233" class="java.lang.String" itemvalue="aiohttp" />
|
||||
<item index="234" class="java.lang.String" itemvalue="grpcio" />
|
||||
<item index="235" class="java.lang.String" itemvalue="aiosignal" />
|
||||
<item index="236" class="java.lang.String" itemvalue="altgraph" />
|
||||
<item index="237" class="java.lang.String" itemvalue="scikit-image" />
|
||||
<item index="238" class="java.lang.String" itemvalue="feather" />
|
||||
<item index="239" class="java.lang.String" itemvalue="cloudpickle" />
|
||||
<item index="240" class="java.lang.String" itemvalue="partd" />
|
||||
<item index="241" class="java.lang.String" itemvalue="pkgutil_resolve_name" />
|
||||
<item index="242" class="java.lang.String" itemvalue="setuptools" />
|
||||
<item index="243" class="java.lang.String" itemvalue="mkl-random" />
|
||||
<item index="244" class="java.lang.String" itemvalue="python-slugify" />
|
||||
<item index="245" class="java.lang.String" itemvalue="locket" />
|
||||
<item index="246" class="java.lang.String" itemvalue="CairoSVG" />
|
||||
<item index="247" class="java.lang.String" itemvalue="mkl" />
|
||||
<item index="248" class="java.lang.String" itemvalue="mkl-fft" />
|
||||
<item index="249" class="java.lang.String" itemvalue="imagecodecs" />
|
||||
<item index="250" class="java.lang.String" itemvalue="eventlet" />
|
||||
<item index="251" class="java.lang.String" itemvalue="feather-format" />
|
||||
<item index="252" class="java.lang.String" itemvalue="backports.zoneinfo" />
|
||||
<item index="253" class="java.lang.String" itemvalue="PyWavelets" />
|
||||
<item index="254" class="java.lang.String" itemvalue="pywin32-ctypes" />
|
||||
<item index="255" class="java.lang.String" itemvalue="cssselect2" />
|
||||
<item index="256" class="java.lang.String" itemvalue="pyarrow" />
|
||||
<item index="257" class="java.lang.String" itemvalue="pyinstaller" />
|
||||
<item index="258" class="java.lang.String" itemvalue="lazy_loader" />
|
||||
<item index="259" class="java.lang.String" itemvalue="dnspython" />
|
||||
<item index="260" class="java.lang.String" itemvalue="tifffile" />
|
||||
<item index="261" class="java.lang.String" itemvalue="cairocffi" />
|
||||
<item index="262" class="java.lang.String" itemvalue="Flask-Cors" />
|
||||
<item index="263" class="java.lang.String" itemvalue="aniso8601" />
|
||||
<item index="264" class="java.lang.String" itemvalue="intel-openmp" />
|
||||
<item index="265" class="java.lang.String" itemvalue="text-unidecode" />
|
||||
<item index="266" class="java.lang.String" itemvalue="ray" />
|
||||
<item index="267" class="java.lang.String" itemvalue="pefile" />
|
||||
<item index="268" class="java.lang.String" itemvalue="pyinstaller-hooks-contrib" />
|
||||
<item index="269" class="java.lang.String" itemvalue="chardet" />
|
||||
<item index="270" class="java.lang.String" itemvalue="imageio" />
|
||||
<item index="271" class="java.lang.String" itemvalue="toolz" />
|
||||
<item index="272" class="java.lang.String" itemvalue="tbb" />
|
||||
<item index="273" class="java.lang.String" itemvalue="cytoolz" />
|
||||
<item index="274" class="java.lang.String" itemvalue="dask" />
|
||||
<item index="275" class="java.lang.String" itemvalue="aspose-words" />
|
||||
<item index="276" class="java.lang.String" itemvalue="Flask-RESTful" />
|
||||
<item index="277" class="java.lang.String" itemvalue="msgpack" />
|
||||
<item index="278" class="java.lang.String" itemvalue="aiofiles" />
|
||||
<item index="279" class="java.lang.String" itemvalue="python-multipart" />
|
||||
<item index="280" class="java.lang.String" itemvalue="wheel" />
|
||||
<item index="281" class="java.lang.String" itemvalue="pymongo" />
|
||||
<item index="282" class="java.lang.String" itemvalue="triton" />
|
||||
<item index="283" class="java.lang.String" itemvalue="pymilvus" />
|
||||
<item index="284" class="java.lang.String" itemvalue="facexlib" />
|
||||
<item index="285" class="java.lang.String" itemvalue="pyiqa" />
|
||||
<item index="286" class="java.lang.String" itemvalue="gradio" />
|
||||
<item index="287" class="java.lang.String" itemvalue="xformers" />
|
||||
<item index="288" class="java.lang.String" itemvalue="opencv-python-headless" />
|
||||
<item index="289" class="java.lang.String" itemvalue="lpips" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<option name="ignoredErrors">
|
||||
<list>
|
||||
<option value="N806" />
|
||||
<option value="N802" />
|
||||
<option value="N803" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoredIdentifiers">
|
||||
<list>
|
||||
<option value="dict.*" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
7
.idea/misc.xml
generated
Normal file
7
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Black">
|
||||
<option name="sdkName" value="aida" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="trinity_client_aida" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/trinity_client_aida.iml" filepath="$PROJECT_DIR$/.idea/trinity_client_aida.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/trinity_client_aida.iml
generated
Normal file
8
.idea/trinity_client_aida.iml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="jdk" jdkName="trinity_client_aida" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
22
Dockerfile
Normal file
22
Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
FROM python:3.9
|
||||
ENV TZ=Asia/Shanghai
|
||||
RUN apt update
|
||||
RUN apt install -y vim
|
||||
RUN apt install -y libgl1-mesa-glx
|
||||
COPY ./requirements.txt /requirements.txt
|
||||
RUN pip install --upgrade pip
|
||||
RUN pip install -r requirements.txt
|
||||
RUN pip install gunicorn
|
||||
RUN pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
|
||||
RUN pip install mmcv==1.4.2 -f https://download.openmmlab.com/mmcv/dist/cu117/torch1.13/index.html
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
ENV FLASK_APP=manage.py
|
||||
LABEL maintainer="zchengrong@yeah.net" \
|
||||
description="My Python 3.9 - trinity aida " \
|
||||
version="1.0" \
|
||||
name="trinity_aida"
|
||||
|
||||
|
||||
CMD ["gunicorn", "-c", "gunicorn_config.py", "app.main:app"]
|
||||
45
README.md
Normal file
45
README.md
Normal file
@@ -0,0 +1,45 @@
|
||||
文件解释
|
||||
-----------
|
||||
|
||||
样例包括:
|
||||
|
||||
* README.md - 本文件
|
||||
* Dockerfile - 用以自动构建 Docker 镜像的脚本
|
||||
* requirements.txt - 依赖包文件
|
||||
* main.py - 主 Flask 服务器端源代码
|
||||
* python-version : 3.9
|
||||
|
||||
快速开始
|
||||
---------------
|
||||
|
||||
如下这些引导,假定你想在自己的电脑上开发本项目。
|
||||
|
||||
1. 安装依赖
|
||||
|
||||
$ conda create -n trinity_client_aida python=3.9 -y
|
||||
$ conda activate trinity_client_aida
|
||||
$ pip install -r requirements.txt
|
||||
$ conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia -y
|
||||
$ pip install mmcv==1.4.2 -f https://download.openmmlab.com/mmcv/dist/cu117/torch1.13/index.html
|
||||
|
||||
|
||||
2. 启动服务器
|
||||
|
||||
$ uvicorn app.main:app --host 0.0.0.0 --port 8000
|
||||
|
||||
3. 打开 http://127.0.0.1:8000/docs
|
||||
|
||||
Docker 部署
|
||||
---------------
|
||||
1. 构建镜像
|
||||
|
||||
$ cd {workspace}
|
||||
$ docker build -t trinity_client_mixi
|
||||
|
||||
2. 使用docker-compose 启动
|
||||
|
||||
$ docker-compose up -d
|
||||
|
||||
3. 查看日志
|
||||
|
||||
$ docker-compose logs -f
|
||||
0
app/__init__.py
Normal file
0
app/__init__.py
Normal file
0
app/api/__init__.py
Normal file
0
app/api/__init__.py
Normal file
9
app/api/api_route.py
Normal file
9
app/api/api_route.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from fastapi import APIRouter
|
||||
|
||||
from app.api import api_test
|
||||
from app.api import api_super_resolution
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
router.include_router(api_test.router, tags=["test"], prefix="/test")
|
||||
router.include_router(api_super_resolution.router, tags=["api_super_resolution"], prefix="/api")
|
||||
14
app/api/api_super_resolution.py
Normal file
14
app/api/api_super_resolution.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from fastapi import APIRouter
|
||||
|
||||
from app.schemas.super_resolution import SuperResolutionModel
|
||||
from app.service.super_resolution.service import SuperResolution
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.post("super_resolution")
|
||||
def super_resolution(request_item: SuperResolutionModel):
|
||||
service = SuperResolution()
|
||||
sr_result_url = service.sr_result(request_item.sr_image_url, request_item.sr_xn)
|
||||
response = {"sr_result_url": sr_result_url}
|
||||
return {"code": 200, "message": "ok", "data": response}
|
||||
14
app/api/api_test.py
Normal file
14
app/api/api_test.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import logging
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
logger = logging.getLogger()
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
|
||||
|
||||
@router.get("")
|
||||
def test():
|
||||
logger.info("test")
|
||||
return {"message": "ok"}
|
||||
0
app/core/__init__.py
Normal file
0
app/core/__init__.py
Normal file
53
app/core/config.py
Normal file
53
app/core/config.py
Normal file
@@ -0,0 +1,53 @@
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
from pydantic import BaseSettings
|
||||
|
||||
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../'))
|
||||
load_dotenv(os.path.join(BASE_DIR, '.env'))
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
PROJECT_NAME = os.getenv('PROJECT_NAME', 'FASTAPI BASE')
|
||||
SECRET_KEY = os.getenv('SECRET_KEY', '')
|
||||
API_PREFIX = ''
|
||||
BACKEND_CORS_ORIGINS = ['*']
|
||||
DATABASE_URL = os.getenv('SQL_DATABASE_URL', '')
|
||||
ACCESS_TOKEN_EXPIRE_SECONDS: int = 60 * 60 * 24 * 7 # Token expired after 7 days
|
||||
SECURITY_ALGORITHM = 'HS256'
|
||||
LOGGING_CONFIG_FILE = os.path.join(BASE_DIR, 'logging_env.py')
|
||||
|
||||
|
||||
settings = Settings()
|
||||
|
||||
ckpt = 'service/super_resolution_ccsr/weights/real-world_ccsr.ckpt'
|
||||
config = 'service/super_resolution_ccsr/configs/model/ccsr_stage2.yaml'
|
||||
steps = 45
|
||||
sr_scale = 4
|
||||
repeat_times = 1
|
||||
tiled = False
|
||||
tile_size = 512
|
||||
tile_stride = 256
|
||||
color_fix_type = "adain"
|
||||
t_max = 0.6667
|
||||
t_min = 0.3333
|
||||
show_lq = False
|
||||
skip_if_exist = False
|
||||
seed = 233
|
||||
device = "cuda"
|
||||
tile_diffusion = False #
|
||||
tile_diffusion_size = 512
|
||||
tile_diffusion_stride = 256
|
||||
tile_vae = True
|
||||
vae_decoder_tile_size = 224
|
||||
vae_encoder_tile_size = 1024
|
||||
strength = 1
|
||||
# minio 配置
|
||||
sr_bucket = "test"
|
||||
MINIO_IP = "www.minio.aida.com.hk"
|
||||
MINIO_PORT = 9000
|
||||
MINIO_ACCESS = 'vXKFLSJkYeEq2DrSZvkB'
|
||||
MINIO_SECRET = 'uKTZT3x7C43WvPN9QTc99DiRkwddWZrG9Uh3JVlR'
|
||||
MINIO_SECURE = True
|
||||
# input = 'preprocess_img/input_x2' # 这个值需要被函数参数覆盖
|
||||
# output = '/path/to/output' # 这个值将被函数参数覆盖
|
||||
LOGS_PATH = "logs/errors.log"
|
||||
1
app/logs/debug.log
Normal file
1
app/logs/debug.log
Normal file
@@ -0,0 +1 @@
|
||||
2024-03-12 13:03:10,034 main.py [line:43] INFO test ok
|
||||
28
app/logs/errors.log
Normal file
28
app/logs/errors.log
Normal file
@@ -0,0 +1,28 @@
|
||||
2024-03-20 11:41:28,641 decorator.py [line:11] INFO function:【read_image】,runtime:【2.3682610988616943】s
|
||||
2024-03-20 11:41:28,641 decorator.py [line:11] INFO function:【read_image】,runtime:【2.3682610988616943】s
|
||||
2024-03-20 11:41:28,978 decorator.py [line:11] INFO function:【sr_result】,runtime:【2.7045106887817383】s
|
||||
2024-03-20 11:41:28,978 decorator.py [line:11] INFO function:【sr_result】,runtime:【2.7045106887817383】s
|
||||
2024-03-20 11:41:40,123 decorator.py [line:11] INFO function:【read_image】,runtime:【6.277707099914551】s
|
||||
2024-03-20 11:41:40,123 decorator.py [line:11] INFO function:【read_image】,runtime:【6.277707099914551】s
|
||||
2024-03-20 11:41:40,439 decorator.py [line:11] INFO function:【sr_result】,runtime:【6.594382047653198】s
|
||||
2024-03-20 11:41:40,439 decorator.py [line:11] INFO function:【sr_result】,runtime:【6.594382047653198】s
|
||||
2024-03-20 11:41:41,338 decorator.py [line:11] INFO function:【read_image】,runtime:【0.16055655479431152】s
|
||||
2024-03-20 11:41:41,338 decorator.py [line:11] INFO function:【read_image】,runtime:【0.16055655479431152】s
|
||||
2024-03-20 11:41:41,643 decorator.py [line:11] INFO function:【sr_result】,runtime:【0.46419310569763184】s
|
||||
2024-03-20 11:41:41,643 decorator.py [line:11] INFO function:【sr_result】,runtime:【0.46419310569763184】s
|
||||
2024-03-20 11:41:42,625 decorator.py [line:11] INFO function:【read_image】,runtime:【0.15813016891479492】s
|
||||
2024-03-20 11:41:42,625 decorator.py [line:11] INFO function:【read_image】,runtime:【0.15813016891479492】s
|
||||
2024-03-20 11:41:42,929 decorator.py [line:11] INFO function:【sr_result】,runtime:【0.4632871150970459】s
|
||||
2024-03-20 11:41:42,929 decorator.py [line:11] INFO function:【sr_result】,runtime:【0.4632871150970459】s
|
||||
2024-03-20 11:41:48,216 decorator.py [line:11] INFO function:【read_image】,runtime:【0.1381824016571045】s
|
||||
2024-03-20 11:41:48,216 decorator.py [line:11] INFO function:【read_image】,runtime:【0.1381824016571045】s
|
||||
2024-03-20 11:41:48,537 decorator.py [line:11] INFO function:【sr_result】,runtime:【0.4588344097137451】s
|
||||
2024-03-20 11:41:48,537 decorator.py [line:11] INFO function:【sr_result】,runtime:【0.4588344097137451】s
|
||||
2024-03-20 11:42:48,128 decorator.py [line:11] INFO function:【read_image】,runtime:【0.15878772735595703】s
|
||||
2024-03-20 11:42:48,128 decorator.py [line:11] INFO function:【read_image】,runtime:【0.15878772735595703】s
|
||||
2024-03-20 11:42:48,463 decorator.py [line:11] INFO function:【sr_result】,runtime:【0.49385905265808105】s
|
||||
2024-03-20 11:42:48,463 decorator.py [line:11] INFO function:【sr_result】,runtime:【0.49385905265808105】s
|
||||
2024-03-20 11:43:24,220 decorator.py [line:11] INFO function:【read_image】,runtime:【0.16216182708740234】s
|
||||
2024-03-20 11:43:24,220 decorator.py [line:11] INFO function:【read_image】,runtime:【0.16216182708740234】s
|
||||
2024-03-20 11:43:24,563 decorator.py [line:11] INFO function:【sr_result】,runtime:【0.5048878192901611】s
|
||||
2024-03-20 11:43:24,563 decorator.py [line:11] INFO function:【sr_result】,runtime:【0.5048878192901611】s
|
||||
1
app/logs/info.log
Normal file
1
app/logs/info.log
Normal file
@@ -0,0 +1 @@
|
||||
2024-03-12 13:03:10,034 main.py [line:43] INFO test ok
|
||||
38
app/main.py
Normal file
38
app/main.py
Normal file
@@ -0,0 +1,38 @@
|
||||
import logging.config
|
||||
|
||||
import uvicorn
|
||||
from fastapi import FastAPI
|
||||
|
||||
from app.api.api_route import router
|
||||
from app.core.config import settings
|
||||
from logging_env import LOGGER_CONFIG_DICT
|
||||
|
||||
logging.config.dictConfig(LOGGER_CONFIG_DICT)
|
||||
|
||||
from starlette.middleware.cors import CORSMiddleware
|
||||
|
||||
|
||||
def get_application() -> FastAPI:
|
||||
application = FastAPI(
|
||||
title=settings.PROJECT_NAME, docs_url="/docs", redoc_url='/re-docs',
|
||||
openapi_url=f"{settings.API_PREFIX}/openapi.json",
|
||||
description='''
|
||||
Base frame with FastAPI
|
||||
- Super Resolution API
|
||||
|
||||
'''
|
||||
)
|
||||
application.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=[str(origin) for origin in settings.BACKEND_CORS_ORIGINS],
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
application.include_router(router=router, prefix=settings.API_PREFIX)
|
||||
return application
|
||||
|
||||
|
||||
app = get_application()
|
||||
if __name__ == '__main__':
|
||||
uvicorn.run(app, host="0.0.0.0", port=8000)
|
||||
6
app/schemas/super_resolution.py
Normal file
6
app/schemas/super_resolution.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class SuperResolutionModel(BaseModel):
|
||||
sr_image_url: str
|
||||
sr_xn: int
|
||||
67
app/service/super_resolution/service.py
Normal file
67
app/service/super_resolution/service.py
Normal file
@@ -0,0 +1,67 @@
|
||||
import io
|
||||
import logging
|
||||
from io import BytesIO
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
import torch
|
||||
import tritonclient.http as httpclient
|
||||
from minio import Minio
|
||||
|
||||
from app.core.config import MINIO_IP, MINIO_ACCESS, MINIO_SECRET, MINIO_SECURE, MINIO_PORT
|
||||
|
||||
from app.service.utils.decorator import RunTime
|
||||
from app.service.utils.generate_uuid import generate_uuid
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
|
||||
class SuperResolution:
|
||||
def __init__(self):
|
||||
self.triton_client = httpclient.InferenceServerClient(url=f"10.1.1.150:7000")
|
||||
self.minio_client = Minio(
|
||||
f"{MINIO_IP}:{MINIO_PORT}",
|
||||
access_key=MINIO_ACCESS,
|
||||
secret_key=MINIO_SECRET,
|
||||
secure=MINIO_SECURE)
|
||||
|
||||
@RunTime
|
||||
def read_image(self, image_url):
|
||||
image_data = self.minio_client.get_object(image_url.split("/", 1)[0], image_url.split("/", 1)[1])
|
||||
img = np.frombuffer(image_data.data, np.uint8) # 转成8位无符号整型
|
||||
img = cv2.imdecode(img, cv2.IMREAD_COLOR).astype(np.float32) / 255. # 解码
|
||||
return img
|
||||
|
||||
@RunTime
|
||||
def sr_result(self, image_url, sr_xn):
|
||||
sample = self.read_image(image_url)
|
||||
sample = np.transpose(sample if sample.shape[2] == 1 else sample[:, :, [2, 1, 0]], (2, 0, 1))
|
||||
sample = torch.from_numpy(sample).float().unsqueeze(0).numpy()
|
||||
inputs = [
|
||||
httpclient.InferInput("input", sample.shape, datatype="FP32")
|
||||
]
|
||||
inputs[0].set_data_from_numpy(sample, binary_data=True)
|
||||
results = self.triton_client.infer(model_name="super_resolution", inputs=inputs)
|
||||
|
||||
sr_output = torch.from_numpy(results.as_numpy(f"output"))
|
||||
output = sr_output.data.squeeze().float().cpu().clamp_(0, 1).numpy()
|
||||
if output.ndim == 3:
|
||||
output = np.transpose(output[[2, 1, 0], :, :], (1, 2, 0)) # CHW-RGB to HCW-BGR
|
||||
output = (output * 255.0).round().astype(np.uint8)
|
||||
output_url = self.upload_img_sr(output, generate_uuid())
|
||||
return output_url
|
||||
|
||||
def upload_img_sr(self, image, object_name):
|
||||
try:
|
||||
image_bytes = cv2.imencode('.jpg', image)[1].tobytes()
|
||||
image_url = f"test/{self.minio_client.put_object(f'test', f'{object_name}.jpg', io.BytesIO(image_bytes), len(image_bytes), content_type='image/png').object_name}"
|
||||
|
||||
return image_url
|
||||
except Exception as e:
|
||||
logger.warning(f"upload_png_mask runtime exception : {e}")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
service = SuperResolution()
|
||||
result_url = service.sr_result("test/128_image/11.png", 4)
|
||||
print(result_url)
|
||||
28
app/service/super_resolution/test.py
Normal file
28
app/service/super_resolution/test.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import time
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
import torch
|
||||
import tritonclient.http as httpclient
|
||||
from PIL import Image
|
||||
|
||||
triton_client = httpclient.InferenceServerClient(url=f"10.1.1.150:7000")
|
||||
|
||||
sample = cv2.imread("comic2.png", cv2.IMREAD_COLOR).astype(np.float32) / 255.
|
||||
sample = np.transpose(sample if sample.shape[2] == 1 else sample[:, :, [2, 1, 0]], (2, 0, 1))
|
||||
sample = torch.from_numpy(sample).float().unsqueeze(0).numpy()
|
||||
inputs = [
|
||||
httpclient.InferInput("input", sample.shape, datatype="FP32")
|
||||
]
|
||||
inputs[0].set_data_from_numpy(sample, binary_data=True)
|
||||
start_time = time.time()
|
||||
results = triton_client.infer(model_name="super_resolution", inputs=inputs)
|
||||
print(time.time() - start_time)
|
||||
sr_output = torch.from_numpy(results.as_numpy(f"output"))
|
||||
output = sr_output.data.squeeze().float().cpu().clamp_(0, 1).numpy()
|
||||
if output.ndim == 3:
|
||||
output = np.transpose(output[[2, 1, 0], :, :], (1, 2, 0)) # CHW-RGB to HCW-BGR
|
||||
output = (output * 255.0).round().astype(np.uint8)
|
||||
# cv2.imshow("", output)
|
||||
# cv2.waitKey(0)
|
||||
cv2.imwrite("comic3.png", output)
|
||||
14
app/service/utils/decorator.py
Normal file
14
app/service/utils/decorator.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import time
|
||||
import logging
|
||||
|
||||
|
||||
def RunTime(func):
|
||||
def wrapper(*args, **kwargs):
|
||||
t1 = time.time()
|
||||
res = func(*args, **kwargs)
|
||||
t2 = time.time()
|
||||
if t2 - t1 > 0.05:
|
||||
logging.info(f"function:【{func.__name__}】,runtime:【{str(t2 - t1)}】s")
|
||||
return res
|
||||
|
||||
return wrapper
|
||||
10
app/service/utils/generate_uuid.py
Normal file
10
app/service/utils/generate_uuid.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import threading
|
||||
import uuid
|
||||
|
||||
id_lock = threading.Lock()
|
||||
|
||||
|
||||
def generate_uuid():
|
||||
with id_lock:
|
||||
unique_id = str(uuid.uuid1())
|
||||
return unique_id
|
||||
9
docker-compose.yml
Normal file
9
docker-compose.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
version: "3"
|
||||
services:
|
||||
trinity_mixi:
|
||||
image: "trinity_client_mixi:latest"
|
||||
container_name: trinity_mixi
|
||||
volumes:
|
||||
- ./trinity_client_mixi:/trinity
|
||||
ports:
|
||||
- "10100:4562"
|
||||
38
gunicorn_config.py
Normal file
38
gunicorn_config.py
Normal file
@@ -0,0 +1,38 @@
|
||||
# 多进程
|
||||
|
||||
"""gunicorn+gevent 的配置文件"""
|
||||
|
||||
# 预加载资源
|
||||
preload_app = True
|
||||
# 绑定 ip + 端口
|
||||
bind = "0.0.0.0:4562"
|
||||
# 进程数 = cup数量 * 2 + 1
|
||||
workers = 1
|
||||
|
||||
# 线程数 = cup数量 * 2
|
||||
threads = 2
|
||||
|
||||
# 等待队列最大长度,超过这个长度的链接将被拒绝连接
|
||||
backlog = 2048
|
||||
|
||||
# 工作模式--协程
|
||||
worker_class = "uvicorn.workers.UvicornWorker"
|
||||
|
||||
# 最大客户客户端并发数量,对使用线程和协程的worker的工作有影响
|
||||
# 服务器配置设置的值 1200:中小型项目 上万并发: 中大型
|
||||
# 服务器硬件:宽带+数据库+内存
|
||||
# 服务器的架构:集群 主从
|
||||
worker_connections = 1200
|
||||
|
||||
# 进程名称
|
||||
proc_name = 'gunicorn.pid'
|
||||
# 进程pid记录文件
|
||||
pidfile = 'app_run.log'
|
||||
# 日志等级
|
||||
loglevel = 'info'
|
||||
# 日志文件名
|
||||
logfile = 'info.log'
|
||||
# 访问记录
|
||||
accesslog = 'access.log'
|
||||
# 访问记录格式
|
||||
access_log_format = '%(h)s %(t)s %(U)s %(q)s'
|
||||
51
logging_env.py
Normal file
51
logging_env.py
Normal file
@@ -0,0 +1,51 @@
|
||||
from app.core.config import LOGS_PATH
|
||||
|
||||
LOGGER_CONFIG_DICT = {
|
||||
"version": 1,
|
||||
"disable_existing_loggers": False,
|
||||
"formatters": {
|
||||
"simple": {"format": "%(asctime)s %(filename)s [line:%(lineno)d] %(levelname)s %(message)s"}
|
||||
},
|
||||
"handlers": {
|
||||
"console": {
|
||||
"class": "logging.StreamHandler",
|
||||
"level": "DEBUG",
|
||||
"formatter": "simple",
|
||||
"stream": "ext://sys.stdout",
|
||||
},
|
||||
"info_file_handler": {
|
||||
"class": "logging.handlers.RotatingFileHandler",
|
||||
"level": "INFO",
|
||||
"formatter": "simple",
|
||||
"filename": LOGS_PATH,
|
||||
"maxBytes": 10485760,
|
||||
"backupCount": 50,
|
||||
"encoding": "utf8",
|
||||
},
|
||||
"error_file_handler": {
|
||||
"class": "logging.handlers.RotatingFileHandler",
|
||||
"level": "ERROR",
|
||||
"formatter": "simple",
|
||||
"filename": LOGS_PATH,
|
||||
"maxBytes": 10485760,
|
||||
"backupCount": 20,
|
||||
"encoding": "utf8",
|
||||
},
|
||||
"debug_file_handler": {
|
||||
"class": "logging.handlers.RotatingFileHandler",
|
||||
"level": "DEBUG",
|
||||
"formatter": "simple",
|
||||
"filename": LOGS_PATH,
|
||||
"maxBytes": 10485760,
|
||||
"backupCount": 50,
|
||||
"encoding": "utf8",
|
||||
},
|
||||
},
|
||||
"loggers": {
|
||||
"my_module": {"level": "INFO", "handlers": ["console"], "propagate": "no"}
|
||||
},
|
||||
"root": {
|
||||
"level": "INFO",
|
||||
"handlers": ["error_file_handler", "info_file_handler", "debug_file_handler", "console"],
|
||||
},
|
||||
}
|
||||
BIN
requirements.txt
Normal file
BIN
requirements.txt
Normal file
Binary file not shown.
Reference in New Issue
Block a user