diff --git a/README.md b/README.md index da2e6db4..6ea7e685 100644 --- a/README.md +++ b/README.md @@ -216,7 +216,7 @@ create them, if you are using the default settings. You can customize the paths In the `api/` directory, run the server with Flask: ```shell -> flask --app serve run +> flask --app=onnx_web run ``` Note the IP address this prints. @@ -224,7 +224,7 @@ Note the IP address this prints. If you want to access the server from other machines on your local network, pass the `--host` argument: ```shell -> flask --app serve run --host 0.0.0.0 +> flask --app=onnx_web run --host=0.0.0.0 ``` This will listen for requests from your current local network and may be dangerous. diff --git a/api/Containerfile.alpine b/api/Containerfile.alpine index e7dba86c..84ca4ce6 100644 --- a/api/Containerfile.alpine +++ b/api/Containerfile.alpine @@ -11,6 +11,6 @@ COPY requirements.txt /onnx-web/requirements.txt RUN pip install -r requirements.txt -COPY serve.py /onnx-web/serve.py +COPY onnx_web/ /onnx-web/onnx_web/ -ENTRYPOINT [ "flask", "--app=serve", "run", "--host=0.0.0.0" ] +ENTRYPOINT [ "flask", "--app=onnx_web", "run", "--host=0.0.0.0" ] diff --git a/api/Containerfile.buster b/api/Containerfile.buster index a3dc80d9..36446ec7 100644 --- a/api/Containerfile.buster +++ b/api/Containerfile.buster @@ -10,6 +10,6 @@ COPY requirements.txt /onnx-web/requirements.txt RUN pip install -r requirements.txt -COPY serve.py /onnx-web/serve.py +COPY onnx_web/ /onnx-web/onnx_web/ -ENTRYPOINT [ "flask", "--app=serve", "run", "--host=0.0.0.0" ] +ENTRYPOINT [ "flask", "--app=onnx_web", "run", "--host=0.0.0.0" ] diff --git a/api/serve.py b/api/onnx_web/serve.py similarity index 100% rename from api/serve.py rename to api/onnx_web/serve.py diff --git a/api/setup.cfg b/api/setup.cfg new file mode 100644 index 00000000..224a7795 --- /dev/null +++ b/api/setup.cfg @@ -0,0 +1,2 @@ +[metadata] +description-file = README.md \ No newline at end of file diff --git a/api/setup.py b/api/setup.py new file mode 100644 index 00000000..bb3ef462 --- /dev/null +++ b/api/setup.py @@ -0,0 +1,25 @@ +import setuptools + +with open("README.md", "r") as fh: + long_description = fh.read() + +setuptools.setup( + name="onnx_web", + version="0.1.0", + author="ssube", + author_email="seansube@gmail.com", + description="web UI for running ONNX models", + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/ssube/onnx-web", + keywords=[ + 'onnx', + ], + packages=setuptools.find_packages(), + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ], + python_requires='>=3.8,<3.11', +) diff --git a/gui/.npmignore b/gui/.npmignore index ca119961..247454ce 100644 --- a/gui/.npmignore +++ b/gui/.npmignore @@ -25,6 +25,8 @@ vendor/ .codeclimate.yml .dockerignore .eslintrc.json +.mocharc.json +.reporters.json Containerfile.* Makefile