From 1a8d9a6b09b1d5ea98dd6098d249a975f81c2fd8 Mon Sep 17 00:00:00 2001 From: osama-shawir <89782802+osama-shawir@users.noreply.github.com> Date: Sat, 9 Dec 2023 18:46:56 -0500 Subject: [PATCH] docker --- .gitignore | 3 +- Dockerfile | 11 --- Makefile | 12 --- requirements.txt | 235 ----------------------------------------------- src/Dockerfile | 14 +-- 5 files changed, 3 insertions(+), 272 deletions(-) delete mode 100644 Dockerfile delete mode 100644 Makefile delete mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index 4d1a1b9..01a3d01 100644 --- a/.gitignore +++ b/.gitignore @@ -163,4 +163,5 @@ cython_debug/ *_keys.json - +# env variables +*env diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 927b746..0000000 --- a/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM python:3.9 - -WORKDIR /code - -COPY ./requirements.txt /code/requirements.txt - -RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt - -COPY ./ /code - -CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "80"] \ No newline at end of file diff --git a/Makefile b/Makefile deleted file mode 100644 index ffd8317..0000000 --- a/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -install: - pip install -r requirements.txt - -format: - black src/*.py api.py - -lint: - pylint --disable=R, api.py src/*py - -refactor: format lint - -all: install lint test format \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index c6500bd..0000000 --- a/requirements.txt +++ /dev/null @@ -1,235 +0,0 @@ -aiofiles==23.2.1 -aiohttp==3.8.6 -aiosignal==1.3.1 -altair==5.1.2 -annotated-types==0.6.0 -anyio==3.7.1 -argon2-cffi @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi_1692818318753/work -argon2-cffi-bindings @ file:///C:/ci_311/argon2-cffi-bindings_1676424443321/work -arrow @ file:///C:/ci_311/arrow_1678249767083/work -asttokens @ file:///home/conda/feedstock_root/build_artifacts/asttokens_1694046349000/work -async-lru @ file:///home/conda/feedstock_root/build_artifacts/async-lru_1690563019058/work -async-timeout==4.0.3 -attrs @ file:///home/conda/feedstock_root/build_artifacts/attrs_1683424013410/work -Babel @ file:///home/conda/feedstock_root/build_artifacts/babel_1677767029043/work -backcall @ file:///home/ktietz/src/ci/backcall_1611930011877/work -backports.functools-lru-cache @ file:///home/conda/feedstock_root/build_artifacts/backports.functools_lru_cache_1687772187254/work -beautifulsoup4 @ file:///C:/b/abs_0agyz1wsr4/croot/beautifulsoup4-split_1681493048687/work -bleach @ file:///home/conda/feedstock_root/build_artifacts/bleach_1674535352125/work -blinker==1.7.0 -bokeh==3.3.2 -boltons @ file:///C:/ci_311/boltons_1677729932371/work -Brotli @ file:///D:/bld/brotli-split_1693583621767/work -brotlipy==0.7.0 -cached-property @ file:///tmp/build/80754af9/cached-property_1600785575025/work -cachetools==5.3.2 -certifi @ file:///C:/b/abs_36eb5mzhph/croot/certifi_1690232276943/work/certifi -cffi @ file:///C:/ci_311/cffi_1676423759166/work -charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1688813409104/work -click==8.1.7 -colorama @ file:///C:/ci_311/colorama_1676422310965/work -comm @ file:///home/conda/feedstock_root/build_artifacts/comm_1691044910542/work -conda @ file:///C:/b/abs_3eb7ewgq2c/croot/conda_1694545461647/work -conda-content-trust @ file:///C:/b/abs_e3bcpyv7sw/croot/conda-content-trust_1693490654398/work -conda-libmamba-solver @ file:///C:/b/abs_016p0csqp7/croot/conda-libmamba-solver_1691418958509/work/src -conda-package-handling @ file:///C:/b/abs_b9wp3lr1gn/croot/conda-package-handling_1691008700066/work -conda_package_streaming @ file:///C:/b/abs_6c28n38aaj/croot/conda-package-streaming_1690988019210/work -contourpy==1.1.0 -cryptography @ file:///C:/b/abs_f4do8t8jfs/croot/cryptography_1694444424531/work -cycler==0.11.0 -dataclasses-json==0.6.1 -debugpy @ file:///D:/bld/debugpy_1691021396537/work -decorator @ file:///opt/conda/conda-bld/decorator_1643638310831/work -defusedxml @ file:///tmp/build/80754af9/defusedxml_1615228127516/work -distro==1.8.0 -emacs==24.1.50.1.post20120610 -entrypoints @ file:///C:/ci_311/entrypoints_1676423328987/work -exceptiongroup @ file:///home/conda/feedstock_root/build_artifacts/exceptiongroup_1692026125334/work -executing @ file:///home/conda/feedstock_root/build_artifacts/executing_1667317341051/work -faiss-cpu==1.7.4 -fastapi==0.104.1 -fastjsonschema @ file:///home/conda/feedstock_root/build_artifacts/python-fastjsonschema_1690055433477/work/dist -filelock @ file:///C:/ci_311/filelock_1676427284139/work -fonttools==4.42.1 -fqdn @ file:///home/conda/feedstock_root/build_artifacts/fqdn_1638810296540/work/dist -frozenlist==1.4.0 -gensim==4.3.2 -gitdb==4.0.11 -GitPython==3.1.40 -google==3.0.0 -google-api-core==2.12.0 -google-auth==2.23.4 -google-cloud==0.34.0 -google-cloud-texttospeech==2.14.2 -googleapis-common-protos==1.61.0 -greenlet==3.0.1 -grpcio==1.59.2 -grpcio-status==1.59.2 -h11==0.14.0 -httpcore==1.0.2 -httpx==0.25.2 -idna @ file:///C:/ci_311/idna_1676424932545/work -importlib-metadata @ file:///home/conda/feedstock_root/build_artifacts/importlib-metadata_1688754491823/work -importlib-resources @ file:///home/conda/feedstock_root/build_artifacts/importlib_resources_1691408075105/work -IneqPy==0.4.1 -ipykernel @ file:///D:/bld/ipykernel_1693880431923/work -ipython @ file:///C:/b/abs_e5729i179y/croot/ipython_1694181400005/work -ipython-genutils @ file:///tmp/build/80754af9/ipython_genutils_1606773439826/work -ipywidgets @ file:///home/conda/feedstock_root/build_artifacts/ipywidgets_1690877070294/work -isoduration @ file:///home/conda/feedstock_root/build_artifacts/isoduration_1638811571363/work/dist -jedi @ file:///home/conda/feedstock_root/build_artifacts/jedi_1690896916983/work -Jinja2 @ file:///C:/ci_311/jinja2_1676424968965/work -joblib==1.3.2 -json5 @ file:///home/conda/feedstock_root/build_artifacts/json5_1688248289187/work -jsonpatch==1.33 -jsonpointer==2.1 -jsonschema @ file:///home/conda/feedstock_root/build_artifacts/jsonschema-meta_1691761378595/work -jsonschema-specifications @ file:///home/conda/feedstock_root/build_artifacts/jsonschema-specifications_1689701150890/work -jupyter @ file:///C:/ci_311/jupyter_1678249952587/work -jupyter-console @ file:///C:/b/abs_82xaa6i2y4/croot/jupyter_console_1680000189372/work -jupyter-events @ file:///home/conda/feedstock_root/build_artifacts/jupyter_events_1691505939576/work -jupyter-lsp @ file:///home/conda/feedstock_root/build_artifacts/jupyter-lsp-meta_1685453365113/work/jupyter-lsp -jupyter_client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1693317508789/work -jupyter_core @ file:///D:/bld/jupyter_core_1686775880418/work -jupyter_server @ file:///home/conda/feedstock_root/build_artifacts/jupyter_server_1693487358826/work -jupyter_server_terminals @ file:///C:/b/abs_ec0dq4b50j/croot/jupyter_server_terminals_1686870763512/work -jupyterlab @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_1692015883666/work -jupyterlab-pygments @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_pygments_1649936611996/work -jupyterlab-widgets @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_widgets_1688489450369/work -jupyterlab_server @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_server_1690205927615/work -kiwisolver==1.4.5 -langchain==0.0.330 -langsmith==0.0.57 -libmambapy @ file:///D:/bld/mamba-split_1693921121220/work/libmambapy -llvmlite==0.40.1 -lxml==4.9.3 -markdown-it-py==3.0.0 -MarkupSafe @ file:///D:/bld/markupsafe_1685769163058/work -marshmallow==3.20.1 -matplotlib==3.7.2 -matplotlib-inline @ file:///C:/ci_311/matplotlib-inline_1676425798036/work -mdurl==0.1.2 -menuinst @ file:///C:/ci_311/menuinst_1678730372782/work -mistune @ file:///home/conda/feedstock_root/build_artifacts/mistune_1692116650819/work -mkl-fft @ file:///C:/b/abs_19i1y8ykas/croot/mkl_fft_1695058226480/work -mkl-random @ file:///C:/b/abs_edwkj1_o69/croot/mkl_random_1695059866750/work -mkl-service==2.4.0 -mpmath @ file:///C:/b/abs_7833jrbiox/croot/mpmath_1690848321154/work -multidict==6.0.4 -mypy-extensions==1.0.0 -nba_api==1.4.1 -nbclient @ file:///home/conda/feedstock_root/build_artifacts/nbclient_1684790896106/work -nbconvert @ file:///home/conda/feedstock_root/build_artifacts/nbconvert-meta_1693331710275/work -nbformat @ file:///C:/b/abs_5a2nea1iu2/croot/nbformat_1694616866197/work -nest-asyncio @ file:///C:/ci_311/nest-asyncio_1676423519896/work -networkx @ file:///C:/b/abs_e6gi1go5op/croot/networkx_1690562046966/work -nltk==3.8.1 -notebook @ file:///home/conda/feedstock_root/build_artifacts/notebook_1693410793506/work -notebook_shim @ file:///home/conda/feedstock_root/build_artifacts/notebook-shim_1682360583588/work -numba==0.57.1 -numpy==1.24.4 -openai==1.3.7 -overrides @ file:///home/conda/feedstock_root/build_artifacts/overrides_1691338815398/work -packaging @ file:///C:/b/abs_28t5mcoltc/croot/packaging_1693575224052/work -pandas==2.1.0 -pandocfilters @ file:///opt/conda/conda-bld/pandocfilters_1643405455980/work -parso @ file:///opt/conda/conda-bld/parso_1641458642106/work -patsy==0.5.3 -pickleshare @ file:///tmp/build/80754af9/pickleshare_1606932040724/work -Pillow==10.0.0 -pkgutil_resolve_name @ file:///home/conda/feedstock_root/build_artifacts/pkgutil-resolve-name_1633981968097/work -platformdirs @ file:///C:/b/abs_b6z_yqw_ii/croot/platformdirs_1692205479426/work -pluggy @ file:///home/conda/feedstock_root/build_artifacts/pluggy_1693086607691/work -ply==3.11 -polars==0.19.2 -prometheus-client @ file:///home/conda/feedstock_root/build_artifacts/prometheus_client_1689032443210/work -prompt-toolkit @ file:///home/conda/feedstock_root/build_artifacts/prompt-toolkit_1688565951714/work -proto-plus==1.22.3 -protobuf==4.25.0 -psutil @ file:///D:/bld/psutil_1681775154857/work -pure-eval @ file:///opt/conda/conda-bld/pure_eval_1646925070566/work -pyarrow==14.0.0 -pyasn1==0.5.0 -pyasn1-modules==0.3.0 -pycosat @ file:///C:/ci_311/pycosat_1676438455539/work -pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work -pydantic==2.4.2 -pydantic_core==2.10.1 -pydeck==0.8.1b0 -pydub==0.25.1 -Pygments @ file:///home/conda/feedstock_root/build_artifacts/pygments_1691408637400/work -pyOpenSSL @ file:///C:/b/abs_08f38zyck4/croot/pyopenssl_1690225407403/work -pyparsing==3.0.9 -PyQt5==5.15.9 -PyQt5-sip @ file:///D:/bld/pyqt-split_1690298094940/work/pyqt_sip -PySocks @ file:///C:/ci_311/pysocks_1676425991111/work -python-dateutil @ file:///tmp/build/80754af9/python-dateutil_1626374649649/work -python-json-logger @ file:///C:/b/abs_cblnsm6puj/croot/python-json-logger_1683824130469/work -python-multipart==0.0.6 -pytz @ file:///C:/b/abs_19q3ljkez4/croot/pytz_1695131651401/work -pywin32==305.1 -pywinpty @ file:///D:/bld/pywinpty_1689413676328/work/target/wheels/pywinpty-2.0.11-cp311-none-win_amd64.whl#sha256=0aa66ba8fbdc1a3573a8e83c49cbd751acd7038fefa927e63785d206112507b3 -PyYAML @ file:///D:/bld/pyyaml_1692737337170/work -pyzmq @ file:///D:/bld/pyzmq_1691667531048/work -qtconsole @ file:///home/conda/feedstock_root/build_artifacts/qtconsole-base_1693604303222/work -QtPy @ file:///home/conda/feedstock_root/build_artifacts/qtpy_1693347765905/work -referencing @ file:///home/conda/feedstock_root/build_artifacts/referencing_1691337268233/work -regex==2023.8.8 -requests @ file:///C:/b/abs_316c2inijk/croot/requests_1690400295842/work -rfc3339-validator @ file:///C:/b/abs_ddfmseb_vm/croot/rfc3339-validator_1683077054906/work -rfc3986-validator @ file:///C:/b/abs_6e9azihr8o/croot/rfc3986-validator_1683059049737/work -rich==13.6.0 -rpds-py @ file:///D:/bld/rpds-py_1694631124230/work -rsa==4.9 -ruamel.yaml @ file:///D:/bld/ruamel.yaml_1686993954643/work -ruamel.yaml.clib @ file:///C:/ci_311/ruamel.yaml.clib_1676434300710/work -scikit-learn==1.3.2 -scipy==1.11.3 -seaborn==0.12.2 -Send2Trash @ file:///D:/bld/send2trash_1682601429724/work -sip @ file:///D:/bld/sip_1690986266255/work -six @ file:///tmp/build/80754af9/six_1644875935023/work -smart-open==6.4.0 -smmap==5.0.1 -sniffio @ file:///home/conda/feedstock_root/build_artifacts/sniffio_1662051266223/work -soupsieve @ file:///home/conda/feedstock_root/build_artifacts/soupsieve_1693929250441/work -SQLAlchemy==2.0.23 -stack-data @ file:///home/conda/feedstock_root/build_artifacts/stack_data_1669632077133/work -starlette==0.27.0 -statsmodels==0.14.0 -streamlit==1.28.1 -sympy @ file:///C:/ci_311_rebuilds/sympy_1679009400182/work -tenacity==8.2.3 -terminado @ file:///C:/ci_311/terminado_1678228513830/work -tex==1.8 -threadpoolctl==3.2.0 -tiktoken==0.5.1 -tinycss2 @ file:///C:/ci_311/tinycss2_1676425376744/work -toml @ file:///tmp/build/80754af9/toml_1616166611790/work -tomli @ file:///C:/ci_311/tomli_1676422027483/work -toolz @ file:///C:/ci_311/toolz_1676431406517/work -torch @ file:///C:/b/abs_abjetg6_iu/croot/pytorch_1686932924616/work -tornado @ file:///D:/bld/tornado_1692311931196/work -tqdm @ file:///home/conda/feedstock_root/build_artifacts/tqdm_1691671248568/work -traitlets @ file:///home/conda/feedstock_root/build_artifacts/traitlets_1675110562325/work -typing-inspect==0.9.0 -typing-utils @ file:///home/conda/feedstock_root/build_artifacts/typing_utils_1622899189314/work -typing_extensions==4.8.0 -tzdata==2023.3 -tzlocal==5.2 -Unidecode==1.3.7 -uri-template @ file:///home/conda/feedstock_root/build_artifacts/uri-template_1688655812972/work/dist -urllib3 @ file:///C:/b/abs_889_loyqv4/croot/urllib3_1686163174463/work -uvicorn==0.24.0.post1 -validators==0.22.0 -watchdog==3.0.0 -wcwidth @ file:///home/conda/feedstock_root/build_artifacts/wcwidth_1673864653149/work -webcolors @ file:///home/conda/feedstock_root/build_artifacts/webcolors_1679900785843/work -webencodings==0.5.1 -websocket-client @ file:///home/conda/feedstock_root/build_artifacts/websocket-client_1692730992302/work -widgetsnbextension @ file:///home/conda/feedstock_root/build_artifacts/widgetsnbextension_1688504439014/work -win-inet-pton @ file:///C:/ci_311/win_inet_pton_1676425458225/work -xyzservices==2023.10.1 -yarl==1.9.2 -zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1689374466814/work -zstandard==0.19.0 diff --git a/src/Dockerfile b/src/Dockerfile index f7fbc84..d7ec7a1 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -1,15 +1,3 @@ -FROM python:3.9 - -WORKDIR /code - -COPY ./requirements.txt /code/requirements.txt - -RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt - -COPY ./ /code - -CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "80"] - # Use an official Python runtime as a parent image FROM python:3.9-slim-buster @@ -28,4 +16,4 @@ RUN pip install --no-cache-dir -r requirements.txt EXPOSE 80 # Run app.py when the container launches -CMD ["uvicorn", "src.app:app", "--host", "0.0.0.0", "--port", "80"] \ No newline at end of file +CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "80"] \ No newline at end of file