diff --git a/dockers/spark/master/Dockerfile b/dockers/spark/master/Dockerfile index 8d2b4cbb..6e45e365 100644 --- a/dockers/spark/master/Dockerfile +++ b/dockers/spark/master/Dockerfile @@ -17,14 +17,16 @@ RUN python -m poetry config virtualenvs.create false \ && python -m poetry show -v # copy source code ONLY after installing dependencies -COPY tube /tube/ +COPY . /tube/ COPY README.md setup.py /tube/ RUN python -m poetry config virtualenvs.create false \ && python -m poetry install -vv --only main --no-interaction \ + && python -m poetry build \ && python -m poetry show -v -RUN pip install . +RUN python -m pip install --upgrade pip +RUN python -m pip install /tube/dist/tube-1.0.5-py3-none-apy.whl EXPOSE 8080 7077 6066 diff --git a/dockers/spark/worker/Dockerfile b/dockers/spark/worker/Dockerfile index 73b83220..4d901960 100644 --- a/dockers/spark/worker/Dockerfile +++ b/dockers/spark/worker/Dockerfile @@ -16,14 +16,16 @@ RUN python -m poetry config virtualenvs.create false \ && python -m poetry show -v # copy source code ONLY after installing dependencies -COPY tube /tube +COPY . /tube COPY README.md setup.py /tube/ RUN python -m poetry config virtualenvs.create false \ && python -m poetry install -vv --only main --no-interaction \ + && python -m poetry build \ && python -m poetry show -v -RUN pip install . +RUN python -m pip install --upgrade pip +RUN python -m pip install /tube/dist/tube-1.0.5-py3-none-apy.whl EXPOSE 8081 diff --git a/poetry.lock b/poetry.lock index 5899698a..5489a82f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1552,6 +1552,20 @@ MarkupSafe = ">=2.1.1" [package.extras] watchdog = ["watchdog (>=2.3)"] +[[package]] +name = "wheel" +version = "0.43.0" +description = "A built-package format for Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "wheel-0.43.0-py3-none-any.whl", hash = "sha256:55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81"}, + {file = "wheel-0.43.0.tar.gz", hash = "sha256:465ef92c69fa5c5da2d1cf8ac40559a8c940886afcef87dcf14b9470862f1d85"}, +] + +[package.extras] +test = ["pytest (>=6.0.0)", "setuptools (>=65)"] + [[package]] name = "wrapt" version = "1.16.0" @@ -1655,4 +1669,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "255ec4a1132b6922ec639ed053b5931b89d1e44f89c789fd9b86686a87334bf3" +content-hash = "4819de1eceaaeda8643a7ab495faa10098079a8f3bbdb00d8c225d5a5c6fcfb7" diff --git a/pyproject.toml b/pyproject.toml index 3e4e83ed..e11e7e7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,7 @@ repository = "https://github.com/uc-cdis/tube" include = [ "NOTICE", ] +packages = [{include = "tube"}] [tool.poetry.dependencies] python = "^3.9" @@ -28,6 +29,7 @@ setuptools = "65.3.0" six = "1.16.0" Werkzeug = "3.0.3" toml="0.10.2" +wheel="0.43.0" [tool.poetry.dev-dependencies] pytest="5.4.3"