clearml-agent icon indicating copy to clipboard operation
clearml-agent copied to clipboard

ClearML-Agent using wrong location for venv when using poetry as a package manager

Open jan-zajac opened this issue 3 years ago • 4 comments

When cloning a task for running on the clearml-agent, the poetry.lock file is picked up fine from the git repository and all the packages installed correctly into the location: /home/ubuntu/.clearml/venvs-builds.1/3.8/task_repository/repository_name/.venv . (As per clearml-agent logs)

But when running the given task, the virtual environment clearml uses is in/home/ubuntu/.clearml/venvs-builds.1/3.8/bin which doesn't have any of the dependencies in it.

I've ssh'd into the instance running clearml-agent and verified this is indeed the case.

jan-zajac avatar Apr 09 '21 15:04 jan-zajac

Hi @jan-zajac, apologies for only getting to this now 🙁 - we'll take a look and try to reproduce - will update soon...

jkhenning avatar Apr 12 '21 20:04 jkhenning

@jan-zajac confirmed, for some reason the new poetry version cannot be directed to a target folder :( I think this is what we need to do: https://python-poetry.org/docs/configuration/#virtualenvscreate-boolean Let me play around with it and update...

bmartinn avatar Apr 13 '21 01:04 bmartinn

Hi @jan-zajac,

We've just updated the code with a fix for the this issue, can you please see if it works for you? To test, simply install ClearML Agent directly from the repository's master using pip install git+https://github.com/allegroai/clearml-agent.git

jkhenning avatar Apr 14 '21 08:04 jkhenning

Hi @bmartinn @jkhenning. Just tested the with the update and confirm that it has fixed my issue, thank you :)

jan-zajac avatar Apr 16 '21 12:04 jan-zajac

Hi @jan-zajac, closing this 🙂

jkhenning avatar Sep 12 '22 06:09 jkhenning