- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for the double post, I made a mistake where I should have posted.
I would like to install VTune Profiler on the host container (including xrdp) and profile the target container.
I don't see any such examples below, so please let me know.
https://software.intel.com/content/www/us/en/develop/documentation/vtune-cookbook/top/configuration-recipes/profiling-in-docker-container.html
I installed Vtune on the host using the following procedure.
host container $ wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB -O - | sudo apt-key add -
host container $ sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
host container $ sudo apt install intel-basekit
I'm not sure how to set the target.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for posting in Analyzers Forum.
You can try using docker image of Intel Base Toolkit in which VTune is already available so that you don’t need to install it separately. Please follow the below steps to successfully profile a Target container from a Host container :
1) Pull oneapi-basekit image
$ docker pull intel/oneapi-basekit
2) Create a bridge network for containers
$ docker network create -d bridge test
3) Run the Host container
$ docker run -p 22:23 --rm -ti --name Host --network test intel/oneapi-basekit bash
4) On another terminal. Run Target container
$ docker run -p 22:24 --rm -ti --name Target --network test intel/oneapi-basekit bash
Note : you can install xrdp inside the container.
5) Install ssh and enable it on both containers
$ apt-get install ssh
$ service ssh start
$ service ssh status
You will see that “ssh is running”
Note : If the installation fails . Try $ apt-get update
6) Enable password less ssh connection between containers
In the Host container , Run the following command to generate public rsa key for connection :
$ ssh-keygen -t rsa
Follow the instructions and the key file will be created in the path you provided.
In the Target container, create the following directory:
mkdir ~/.ssh
Paste the contents of the public key you created into a file named authorized_keys inside ~/.ssh
7) Now try ssh from Host into Target
$ ssh root@Target
$ source /opt/intel/oneapi/setvars.sh and try profiling.
Please refer the below links for more information:
Oneapi-basekit image : https://hub.docker.com/r/intel/oneapi-basekit
Ssh enabling between containers :
https://hub.docker.com/r/intel/oneapi-basekit
https://phoenixnap.com/kb/how-to-ssh-into-docker-container
password less connection :
https://kcaps.medium.com/passwordless-ssh-between-docker-containers-feb68133dfce
Collect data from remote target :
Hope this helps. Get back to us in case of any issues.
Regards,
Raeesa
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for posting in Analyzers Forum.
You can try using docker image of Intel Base Toolkit in which VTune is already available so that you don’t need to install it separately. Please follow the below steps to successfully profile a Target container from a Host container :
1) Pull oneapi-basekit image
$ docker pull intel/oneapi-basekit
2) Create a bridge network for containers
$ docker network create -d bridge test
3) Run the Host container
$ docker run -p 22:23 --rm -ti --name Host --network test intel/oneapi-basekit bash
4) On another terminal. Run Target container
$ docker run -p 22:24 --rm -ti --name Target --network test intel/oneapi-basekit bash
Note : you can install xrdp inside the container.
5) Install ssh and enable it on both containers
$ apt-get install ssh
$ service ssh start
$ service ssh status
You will see that “ssh is running”
Note : If the installation fails . Try $ apt-get update
6) Enable password less ssh connection between containers
In the Host container , Run the following command to generate public rsa key for connection :
$ ssh-keygen -t rsa
Follow the instructions and the key file will be created in the path you provided.
In the Target container, create the following directory:
mkdir ~/.ssh
Paste the contents of the public key you created into a file named authorized_keys inside ~/.ssh
7) Now try ssh from Host into Target
$ ssh root@Target
$ source /opt/intel/oneapi/setvars.sh and try profiling.
Please refer the below links for more information:
Oneapi-basekit image : https://hub.docker.com/r/intel/oneapi-basekit
Ssh enabling between containers :
https://hub.docker.com/r/intel/oneapi-basekit
https://phoenixnap.com/kb/how-to-ssh-into-docker-container
password less connection :
https://kcaps.medium.com/passwordless-ssh-between-docker-containers-feb68133dfce
Collect data from remote target :
Hope this helps. Get back to us in case of any issues.
Regards,
Raeesa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your answer.
Sorry, but I have an additional question.
How should I set up the container if I want to create target on the host network and host on the bridge network?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have almost solved the problem and will describe how to set it up.
It was difficult to set up a new container, so I installed intel-basekit in an existing container.
I installed intel-basekit on both host and target. Then I configured the ssh connection settings.
The setup of ssh connection between target and host is the same as Raeesa-san's steps 5) to 7).
Finally, it was just a matter of configuring the ssh destination as usual.
Example:
IP address of docker bridge 0 (target): 172.17.0.1
SSH Port number set in /etc/ssh/sshd_config (target): 10122
I configured the VTune gui (from host) as follows
Remote Linux(SSH)
SSH destination
user@172.17.0.1:10122
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Glad that the solution provided helped and thank you for accepting it as solution. We are discontinuing monitoring this thread. Please raise a new thread incase if you face any more issues. We would be happy to help you.
Thanks and Regards,
Raeesa

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page