allegroai / clearml-agent

ClearML Agent - ML-Ops made easy. ML-Ops scheduler & orchestration solution
https://clear.ml/docs/
Apache License 2.0
241 stars 92 forks source link

How to run a clearml-task without --requirements or --packages when using Docker? #204

Open konstantinator opened 6 months ago

konstantinator commented 6 months ago

Hello everyone!

Could someone tell me how to run a clearml-task without using --requirements or --packages? I've set up the necessary environment in a Docker image and don't need to install any additional packages, but running the command without packages results in an error.

Code to start the agent with Docker:

clearml-agent daemon --queue hello_queue --docker my_hello_image

Code to start the task:

clearml-task --project Hello --name hello --script ./hello_world.py --queue hello_queue \
  --docker my_hello_image --docker_args "-v /data:/data \
  --rm --name my_container_hello"

Output

ClearML launch - launch any codebase on remote machine running clearml-agent
Creating new task

Error: requirements.txt not found [/hello_repo/requirements.txt] Use --requirements or --packages

I have to install an unnecessary package (--packages "pip") to make this command work correctly.

eugen-ajechiloae-clearml commented 6 months ago

Hi @konstantinator! Would --packages "" work for you?

konstantinator commented 6 months ago

Hi @eugen-ajechiloae-clearml! Yes, this works for me, thank you. However, it seems that it would be better if it worked without having to specify the --packages key at all.