Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hello, I Am Trying To Run Some Algorithm In My Docker Container With Clearml Task . But The Algorithm Uses Ros, So I Need Somehow To Setup Environment Before Run It And Launch

Hello, I am trying to run some algorithm in my docker container with Clearml Task . But the algorithm uses ROS, so I need somehow to setup environment before run it and launch roscore . I tried to do it like this in Dockerfile:
RUN echo "source /ros_entrypoint.sh" >> /root/.bashrc RUN echo "source /root/catkin_ws/devel/setup.bash" >> /root/.bashrc RUN echo "roscore &" >> /root/.bashrc RUN echo "sleep 5" >> /root/.bashrcBut when I run the Task it does not execute /root/.bashrc .
Also I tried to add this code into docker_bash_setup_script but then my python script does not execute at all: the Task just gets the status Completed but I don't see any of my python prints which I see when I run the Task without docker_bash_setup_script argument.
What is the right way to set up the environment and run roscore before running the algorithm?

  
  
Posted 3 years ago
Votes Newest

Answers 9


Hi @<1523701205467926528:profile|AgitatedDove14>
I'm having a similar issue.

Also notice the cleaml-agent will not change the entry point of the docker meaning if the entry point does not end with plain bash, it will not actually run anything

Not sure I understand how to run a docker_bash_setup_script and then run a python script - Do you have an example? I could not find one.
Here is our CLI command

clearml-task --name <TASK NAME> \
		--project <PRJ NAME> \
		--repo git@github.com:<REPO NAME>.git \
		--script pytorch/main.py \
		--args dataset_dir='.'  \
		--task-type	training 	\
		--docker_bash_setup_script pre_installations.sh \
		--docker gcr.io/path/to/image \
		--queue default

running on clearml-agent Version 1.9.0

  
  
Posted 2 years ago

@<1523701323046850560:profile|OutrageousSheep60> the assumption is that you have "pre_installations.sh" locally (i.e. when you are calling clearml-task ) what will happen is that this bash script will be put on top of the Task and executed before everything else inside the container
does that make sense ?

  
  
Posted 2 years ago

  • but the

pytorch/main.py

file doesn't run.

What do you have on the Task itself? is this the correct script ?
Any chance you can send a full log ? (you can DM it if it helps)

  
  
Posted 2 years ago

yes - the pre_installations.sh runs and completes - but the pytorch/main.py file doesn't run.
so the Task completes successfully but without running the script

  
  
Posted 2 years ago

So, this is probably a really dumb idea, but can you add
RUN source /root.bashrcor perhaps set the entrypoint?

  
  
Posted 3 years ago

. I'm trying to run to get a task to run using a specific docker image and to source a bash script before execution of the python script.

Are you running an agent in docker mode ? if so you should be able to see the Output of your bash script first thing in the log
(and it will appear in the docker CMD)

  
  
Posted one year ago

LazyFish41 just making sure, you built a container from the docker file, and used it as base docker image for the Task, is that correct ?
Also notice the cleaml-agent will not change the entry point of the docker meaning if the entry point does not end with plain bash, it will not actually run anything

  
  
Posted 3 years ago

@<1523701205467926528:profile|AgitatedDove14> actually no. I was unaware that was needed. I will try that and let you know

  
  
Posted one year ago

@<1523701205467926528:profile|AgitatedDove14> I'm having a similar issue. I'm trying to run to get a task to run using a specific docker image and to source a bash script before execution of the python script.

I'm using docker_bash_setup_script but there is no indication that it was ever run.

Any idea how to get this to work?

  
  
Posted one year ago
1K Views
9 Answers
3 years ago
9 months ago
Tags
Similar posts