and using https://github.com/allegroai/clearml-agent/blob/21c4857795e6392a848b296ceb5480aca5f98e4b/docs/clearml.conf#L140 for running scripts at docker startup
So just after the clone, before creating the env?
So when the repo is cloned and venv is created and activated I want to executed this from the repo: tools/setup_dependencies.sh
That won’t work 😕
The docker shell script runs too early in the process.
I want to inject a bash command after the repo has been clone (and maybe even after the venv has been installed).
I want to inject a bash command after the repo has been clone (and maybe even after the venv has been installed).
LazyTurkey38 the created venv inherits from the system environment, so in theory you can do all the installation on the system python and the created venv will just inherit the packages, no?
(btw: just to clarify, there is only one entry point for the custom bash script and that is before everything, so users can configure the container before the agent starts)
If you want to force install some packages with the agent you can add those here -
https://github.com/allegroai/clearml-agent/blob/21c4857795e6392a848b296ceb5480aca5f98e4b/docs/clearml.conf#L74
For your second question, those are generated using custom tooling, it relies on the build system to be setup which is guaranteed by the docker image used. So I don’t think this is a case of supporting a specific env setup or build tool but just allowing custom script for env setup step / building code.
WDYT?
TimelyPenguin76 After creating the venv (so I don’t have to do it myself). Once an env is there, I need to run a script while the env is activated from the root of the repo.
Hi LazyTurkey38 ,
Basically, when the agent clones the repo and switches into the dev, I want it to run a script that is in the repo that:
Installs some pip dependencies (I kind of want these regardless of any extra deps specific to the task).
what about adding all your packages to the task? can this help? you can do it with Task.add_requirements(package_name, version)
Generate some
py
files/symlinks. This is needed when you use custom C extensions / ANTLR / Protobuf so I’m guessing if other people have this in their repo they’ll want something similar.
How do you generate those?