Skip to content

Commit

Permalink
fix poetry deployment bug (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
haicheviet committed Aug 11, 2023
1 parent 876061d commit 20d2438
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 25 deletions.
6 changes: 3 additions & 3 deletions libs/ml/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions libs/ml/pyproject.toml
Expand Up @@ -7,10 +7,8 @@ authors = ["Hai Che <cheviethai123@gmail.com>"]
[tool.poetry.dependencies]
python = "^3.8.1"
torch = {version = "2.0.1", source="torchcpu"}
telemetry = {path = "../telemetry"}
telemetry = {path = "../telemetry", develop = true}

[tool.poetry.dev-dependencies]
telemetry = {path = "../telemetry", develop = true} # for developing environment

[[tool.poetry.source]]
name = "torchcpu"
Expand Down
1 change: 1 addition & 0 deletions services/common-ml/Dockerfile
Expand Up @@ -27,6 +27,7 @@ RUN curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.5.1 POETRY_HO
# Install dependency
ARG INSTALL_TEST=false
COPY poetry.lock pyproject.toml ./
RUN sed -i 's/develop = true/develop = false/g' pyproject.toml poetry.lock # Change develop to build deployment
COPY --from=telemetry . ../../libs/telemetry
RUN . /opt/venv/bin/activate && if [ $INSTALL_TEST != 'false' ] ; then poetry install --no-root --with test ; \
else poetry install --no-root --only main ; fi
Expand Down
6 changes: 3 additions & 3 deletions services/common-ml/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions services/common-ml/pyproject.toml
Expand Up @@ -6,13 +6,8 @@ authors = ["Hai Che <cheviethai123@gmail.com>"]

[tool.poetry.dependencies]
python = "^3.8.1"
telemetry = {path = "../../libs/telemetry"}


[tool.poetry.dev-dependencies]
telemetry = {path = "../../libs/telemetry", develop = true}


### pytest setup ###
[tool.poetry.group.test]
optional = true
Expand Down
2 changes: 2 additions & 0 deletions services/fastapi-ml/Dockerfile
Expand Up @@ -27,6 +27,8 @@ RUN curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.5.1 POETRY_HO
# Install dependency
ARG INSTALL_TEST=false
COPY poetry.lock pyproject.toml ./
RUN sed -i 's/develop = true/develop = false/g' pyproject.toml poetry.lock # Change develop to build deployment

COPY --from=telemetry . ../../libs/telemetry
COPY --from=ml . ../../libs/ml
COPY --from=mq . ../../libs/mq
Expand Down
12 changes: 6 additions & 6 deletions services/fastapi-ml/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions services/fastapi-ml/pyproject.toml
Expand Up @@ -9,14 +9,10 @@ python = "^3.8.1"
torch = {version = "2.0.1", source="torchcpu"}
fastapi = "0.100.0"
uvicorn = "0.21.1"
ml = {path = "../../libs/ml"}
mq = {path = "../../libs/mq"}


[tool.poetry.dev-dependencies]
ml = {path = "../../libs/ml", develop = true}
mq = {path = "../../libs/mq", develop = true}


[[tool.poetry.source]]
name = "torchcpu"
url = "https://download.pytorch.org/whl/cpu"
Expand Down

0 comments on commit 20d2438

Please sign in to comment.